Search found 4 matches

by RemHep
Thu 06 May 2010 12:59
Forum: dbExpress driver for MySQL
Topic: How to Get the Unique ID for the Last Inserted Row
Replies: 7
Views: 7470

Great thanks!

I've already used "DevartMySQLDirect" in other project. Just a bad "Copy and Paste" of one old DB function.

Sorry for that, thanks for your time!
by RemHep
Wed 05 May 2010 13:14
Forum: dbExpress driver for MySQL
Topic: How to Get the Unique ID for the Last Inserted Row
Replies: 7
Views: 7470

id is AUTO_INCREMENT

With DSQuery Do
Begin
SQLConnection := TmpSQLConnect;
SQL.Clear;
SQL.Add('INSERT INTO tclients SET id=null');
ExecSQL;
SQL.Clear;
SQL.Add('SELECT LAST_INSERT_ID()');
if DSQuery.Active then
DSQuery.Refresh
else
DSQuery.Open;
Result := DSQuery.Fields[0].AsInteger;
Close;
End;

still return 0
by RemHep
Wed 05 May 2010 05:04
Forum: dbExpress driver for MySQL
Topic: How to Get the Unique ID for the Last Inserted Row
Replies: 7
Views: 7470

How to Get the Unique ID for the Last Inserted Row

I've tried to get the last inserted row with MySQL function :

SELECT LAST_INSERT_ID()

But it always return 0.

Can I have an example with TSQLQuery?

Thanks for help!
by RemHep
Tue 15 Sep 2009 13:46
Forum: dbExpress driver for SQL Server
Topic: DBX Error: Error Code: 65535.
Replies: 3
Views: 5985

Connexion DBX Error: Error Code: 65535

I see the same error message in my log this morning. I use dbexpmda40.dll and libmysql.dll from 5.0 MySQL server.

Our application is a multi-threaded server application too­.