Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

DbProviderFactories

Discussion in 'Scripting' started by sangi93, Jan 29, 2011.

  1. sangi93

    sangi93

    Joined:
    Aug 4, 2010
    Posts:
    77
    Hello, Unity Community, I have a problem with integrating MySql Connector .Net into my game. This line should work, however it gives me "BCE0005: Unknown identifier: 'DbProviderFactories'." error. Dont know what to do. Here, the link to this function on msdn : DbProviderFactories.GetFactory Method (String)
    I have imported System.Data.Common, if this line does not say, why I'm getting the error, I will post whole script.
    Code (csharp):
    1. var fac : DbProviderFactory = DbProviderFactories.GetFactory("MySql.Data.MySqlClient");
    2.  
    Thanks in advice,
    Sangi93
     
  2. sangi93

    sangi93

    Joined:
    Aug 4, 2010
    Posts:
    77
    Nevermind, changed API compatibility level to .NET 2.0
     
  3. gavi

    gavi

    Joined:
    Mar 30, 2013
    Posts:
    10
    I tried changing to API compatibility level .Net 2.0 but, on Android, using System.Data doesn't work...

    any advice, please?