12 messages in com.mysql.lists.dotnetRE: SELECT LAST_INSERT_ID() not working| From | Sent On | Attachments |
|---|---|---|
| Paulo Augusto | 05 Mar 2006 10:02 | |
| Pete Alvin | 09 Mar 2006 08:36 | |
| Darren Hill | 09 Mar 2006 08:41 | |
| Daniel Fisla | 09 Mar 2006 09:11 | |
| Lynn Eriksen | 09 Mar 2006 09:24 | |
| ElRincónDelFER | 09 Mar 2006 13:42 | |
| Lynn Eriksen | 09 Mar 2006 13:43 | |
| Darren Hill | 09 Mar 2006 13:45 | |
| Darren Hill | 09 Mar 2006 13:45 | |
| Lynn Eriksen | 09 Mar 2006 13:45 | |
| Daniel Fisla | 09 Mar 2006 13:46 | |
| Darren Hill | 10 Mar 2006 10:50 |
| Subject: | RE: SELECT LAST_INSERT_ID() not working![]() |
|---|---|
| From: | Darren Hill (dhi...@ormac.com) |
| Date: | 03/10/2006 10:50:41 AM |
| List: | com.mysql.lists.dotnet |
Some more insight, this was found on code that is 6 months old. It was never an issue before. I ensured that I was using the SAME connection as the insert and also made sure the connection was not prematurely closed. I was unable to do the same investigation I normally due, so I instead implemented and select ID with the same credentials (including timestamp) as the insert. Works.
________________________________________ Darren Hill - dhi...@ormac.com Ormac Digital Content Management and IT Solutions www.ormacdigital.com
(416) 410-1154 Ormac Digital is proud to partner with: Allstream - www.allstream.com Route1 - www.route1.com
________________________________________
-----Original Message----- From: Paulo Augusto [mailto:Paul...@portugalmail.pt] Sent: March 5, 2006 1:03 PM To: dhi...@ormac.com Cc: dot...@lists.mysql.com Subject: Re: SELECT LAST_INSERT_ID() not working
Are you sure that you are trying to get LAST_INSERT_ID() before you close the connection
LAST_INSERT_ID() is only garanteed to work until you close the connection. If you close it and, then, open it again, it is not garanteed that it will return you the correct value.
Qui, 2006-03-09 às 11:41 -0500, Darren Hill escreveu:
Sorry all,
But this is huge. The SELECT LAST_INSERT_ID() has decided to stop working and I'm stumped. Is this a bug in the new connector?
________________________________________ Darren Hill - dhi...@ormac.com
________________________________________
-- MySQL on .NET Mailing List For list archives: http://lists.mysql.com/dotnet To unsubscribe: http://lists.mysql.com/dotnet?unsub=dar...@ormac.com




