On Thu, 2010-09-23 at 10:42 -0700, El wrote:
> Thanks.  It worked.  My project compiles.  But running it caused an
> error:
> 
> Unhandled Exception: MySql.Data.MySqlClient.MySqlException: ...
...
> Here's my simple test code:
...
>                       dbcon = (IDbConnection) new 
> MySqlConnection("Server=localhost;
> Database=MySqlSampleDb; User=user; Password=password;");

        http://code.google.com/p/dblinq2007/wiki/Installation#To_use_DbLinq

Your problem is that your connection string is missing the
DbLinqProvider parameter.  Consequently DbLinq assumes you're targeting
Microsoft SQL Server, and thus produces MSSQL-style SQL instead of
MySQL-style SQL.

The fix is to add a DbLinqProvider=MySql parameter:

        var dbcon = new MySqlConnection(
                "Server=localhost;" +
                "Database=MySqlSampleDb;" +
                "User=user; Password=Password;" +
                "DbLinqProvider=MySql");
        ...

 - Jon


-- 
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en.

Reply via email to