Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySql and Delphi Tquery

Status
Not open for further replies.

comnut

Programmer
Dec 30, 2003
1
IE
I have a problem with a primary autoinc field in a MySql table...
In my update SQL the value for the autoinc field is not updated. The server should control it. The value generated by the server when a new record is created never come back to my query until I close it. So my primary key (Autoinc field) has the null value until I reopen the Query. Why this value doesn;'t come back to my query... Is that a setting or some code to do??

Please help me!

Eric
Solutions Informatiques Pelluc inc.
edumont@pellluc.com
 
i donot know about delphi. but u can check
1. whether in mysql by checking last_insert_id() in mysql itself. or mysql_insert_id
obviously ur column is defined as auto increment.
2. check in delhpi for equivalent of mysql_insert_id()



[ponder]
----------------
ur feedback is a very welcome desire
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top