No, in the original code it's correct.
However: I'm still having problems, someone can show me some code about
how to extract a "last_insert_id" from a mysql database after a insert,
with SQLdb libs?
On 12/10/2007, Alvise Nicoletti <[EMAIL PROTECTED]> wrote:
---8<---
QryRead.Active := false;
QryRead.SQL.Text := 'SELECT LAST_INSERT_ID() as PK_INGRESSO';
try
QryRead.open;
self.id_ingresso := QryRead.FieldByName('PK_parameter').AsInteger;
must this not be:
self.id_ingresso := QryRead.FieldByName('PK_INGRESSO').AsInteger;?
henry
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives