fluent mapping mysql

4 posts, 0 answers
  1. Gerhard
    Gerhard avatar
    2 posts
    Member since:
    Sep 2012

    Posted 25 Sep 2012 Link to this post

    I followed the example for the fluent mapping and it works fine on mssql. Now I try to switch to mysql.

    I changed the backend:
          Backend = "mysql"
    
    And the connection string:
    <add name="connectionId" connectionString="Data Source=localhost;Database=telerik_test;User ID=root;Password=***;Command Logging=false" providerName="MySql.Data.MySqlClient" />
    
    
    Now the following exception occurs:

    "An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in Telerik.OpenAccess.dll
    Additional information: ProviderName conflicts with backend setting 'mysql'."

    Did I miss something? Connectionstring wrong?

  2. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 27 Sep 2012 Link to this post

    Hi Gerhard,

     Your connection string really looks correct and in the MySql case, this error should not be thrown as the provider you have specified is the provider that OpenAccess expects for MySql. Is it possible for you to send us a sample application where this behavior is reproduced? This should be reproducible even with a connection string that does not access any MySQL instance as the error should be available during the initialization of the first context.

    Kind regards,
    Zoran
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
  3. DevCraft banner
  4. Gerhard
    Gerhard avatar
    2 posts
    Member since:
    Sep 2012

    Posted 04 Oct 2012 Link to this post

    Hi Zoran,
    this morning I was trying to build a sample app to demonstrate this problem but I did not get the same exception as before. No idea why. Instead I get an other one:
    "A first chance exception of type 'Telerik.OpenAccess.OpenAccessException' occurred in Telerik.OpenAccess.dll
    An unhandled exception of type 'Telerik.OpenAccess.OpenAccessException' occurred in Telerik.OpenAccess.dll
    Additional information: System.ArgumentException: Keyword not supported.
    Parametername: command logging"
    So I removed "Command Logging=false" from the connection string and everything went fine.
    Greetings
    Gerhard

  5. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 09 Oct 2012 Link to this post

    Hi Gerhard,

    We are glad to know that you have solved your issue and are able to continue your work with OpenAccess. If you have any further questions/suggestions, please do not hesitate to contact us back.

    Regards,
    Zoran
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
Back to Top