7 messages in com.mysql.lists.win32Insert problems
FromSent OnAttachments
ian_...@tiscali.co.uk27 Jul 2004 03:08 
Petr Vileta27 Jul 2004 06:14 
Davut Topcan27 Jul 2004 06:38 
Jason Lim27 Jul 2004 18:09 
Eduardo Silva28 Jul 2004 04:42 
Jason Lim29 Jul 2004 06:04 
Jason Lim29 Jul 2004 06:52 
Subject:Insert problems
From:ian_...@tiscali.co.uk (ian_@tiscali.co.uk)
Date:07/27/2004 03:08:15 AM
List:com.mysql.lists.win32

Hi again all,

I tried the advise, but it doesn't seem to work. After the insert I do the Last_Insert_ID() but I always get an empty dataset back, but the record has been posted into the table...

Here is the code I am using, it may be clear to you what I am doing wrong. (The 1st line is just a routine to populate the sql string with variable values).

qryGeneral.SQL.Text:=Variables1.ParseLine(qryGeneral.SQL.Text); frmMDIMaster.Statusbar1.SimpleText:=qryGeneral.SQL.Text; qryGeneral.Prepare; qryGeneral.ExecSQL;

qryGeneral.SQL.Text:='SELECT Last_Insert_ID()'; qryGeneral.Prepare; qryGeneral.ExecSQL;

Any other ideas what I might try?

TIA

__________________________________________________ Broadband from an unbeatable £15.99!

http://www.tiscali.co.uk/products/broadband/home.html?code=SM-NL-11AM