Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all

Now i want a insert function to be added to a tableadpator with following specs:

1. take one parameter ( one datatable which is binded to the DB)
2. to be scalar to be able to return last_insert_id()

How this can be done in C# using VS2005 & Mysql

I tried millions of ways which gives millions of endless bugs !!

Thanks for any help

Bye
Posted
Updated 18-May-11 19:17pm
v2
Comments
[no name] 19-May-11 1:18am    
Could you please show your code, then we can guide you where you went wrong.

what if you put your insert query in an SP and return that latest autogenerated id from the procedure.
 
Share this answer
 
What have you tried for this in Insert Query and what is the Output it got Generated based on your Stored Procedure.
 
Share this answer
 
final
not to use ODBC and use .Net connect and add in the insert query

; select last_insert_id() as 'xxx'

xxx your required id name

bye
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900