Want to Execute MySql Stored procedure in Dot Net
-
Hi.. buddies I am using MSVS 2008 and Mysql server 5.0. I want to fetch records in my webform through stored procedure stored in mysql database. But when i execute the code i m getting following error msg; "ERROR [42000] [MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Exec Area_Of_Rec_M_SelectAll()'" Could you tell me the right code to handle the problem. Thanks Hemant Thaker.
By: Hemant Thaker
-
Hi.. buddies I am using MSVS 2008 and Mysql server 5.0. I want to fetch records in my webform through stored procedure stored in mysql database. But when i execute the code i m getting following error msg; "ERROR [42000] [MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Exec Area_Of_Rec_M_SelectAll()'" Could you tell me the right code to handle the problem. Thanks Hemant Thaker.
By: Hemant Thaker
Hemant Thaker wrote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Exec Area_Of_Rec_M_SelectAll()'
I think its trying to tell you something here.
Bob Ashfield Consultants Ltd
-
Hemant Thaker wrote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Exec Area_Of_Rec_M_SelectAll()'
I think its trying to tell you something here.
Bob Ashfield Consultants Ltd
I got the resolution. it's "Call Stored_proc_Name" This should be your command object's CommandText property. Thanks
By: Hemant Thaker
-
I got the resolution. it's "Call Stored_proc_Name" This should be your command object's CommandText property. Thanks
By: Hemant Thaker
Or you can set .CommandType to ystem.Data.CommandType.StoredProcedure and set .CommandText to the name of the stored procedure. I think this is supposed to run slightly faster as the server doesn't have to parse out the "CALL" command.