The .Neta Adapter.. does it make a persistent connection? If the connection drops between the first insert and the call to select, then the return would be zero
Alan > -----Original Message----- > From: Cain O'Sullivan [mailto:cos@;iinet.net.au] > Sent: Wednesday, 13 November 2002 16:13 > To: [EMAIL PROTECTED] > Subject: last_insert_id() > > > Hi, > > I am using C# with ODBC.Net to communicate with MySQL. I want to > determine > the last ID of an auto_increment field in the database. When I manually > perform the insert using the MySQL command window I can then > follow up with > "select last_insert_id()" and I get the correct value, however, when using > ODBC to perform the insert (via a .Net DataAdapter) the last_insert_id() > returns 0. > > Can anyone provide some insight into this? > > Best Regards, > > Cain O'Sullivan > [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php