R
Ryan Liu
Hi,
I downloaded the latest version of mysql 5.0 and its .NET driver, I copied
the sample code from mysql 5.0 manual to do use prepared statement in C#.
But indeed I got a run time error say that "#42000You have an error in your
SQL syntax; ..."
I tried variuos format and I get regular statement(with parameters) and
stored procedure works fine in my c# code, but just not for cmd.Prepare().
Can someone tell me what actually is right syntax to use ? Thanks a lot!
===================
And I see sample code from MySql, or Microsoft SDK, I am surprise to see the
writer like to new a specific type IDbCommand, not use
IDbConnection.CreatCommand(), isn't the second way more generic and
prefered? Is there difference between two way?
And why the IDbConnection does not have method to CreateDataAdapter()?
I want my application support different database, I have to repeat code for
different driver is realy not a happy thing.
Thanks a lot!
I downloaded the latest version of mysql 5.0 and its .NET driver, I copied
the sample code from mysql 5.0 manual to do use prepared statement in C#.
But indeed I got a run time error say that "#42000You have an error in your
SQL syntax; ..."
I tried variuos format and I get regular statement(with parameters) and
stored procedure works fine in my c# code, but just not for cmd.Prepare().
Can someone tell me what actually is right syntax to use ? Thanks a lot!
===================
And I see sample code from MySql, or Microsoft SDK, I am surprise to see the
writer like to new a specific type IDbCommand, not use
IDbConnection.CreatCommand(), isn't the second way more generic and
prefered? Is there difference between two way?
And why the IDbConnection does not have method to CreateDataAdapter()?
I want my application support different database, I have to repeat code for
different driver is realy not a happy thing.
Thanks a lot!