LastInsertID - Maybe im a dumb! :P
Posted: Tue 06 Feb 2007 18:31
Hi,
Im used to code with mySQL from PHP and for retrieve the LastID from a table after an Insert usually I did a table with counters to assure it on a multiuser environment.
But now, sad, im coding an app for .Net, and using directly the commands from your library there is no problem to do it, its easy as well you put it in a public var.
But now im trying to get it after a Adapter update.
Easy code:
- Binding addnew
- A form filled from scrath, with binding to a ds.
- Binding endupdate
- TableAdaptor Update
- And then...
Dunno whats the best way to get the last inserted id form there, think it should be easy but cant find solution, thinking i dont wanna do a ugly code doing a nasty select.. etc...
Can you show me the light and give me the best easier solution for it, thinking that it can be a multiuser app.
Thanx in advance,
Im used to code with mySQL from PHP and for retrieve the LastID from a table after an Insert usually I did a table with counters to assure it on a multiuser environment.
But now, sad, im coding an app for .Net, and using directly the commands from your library there is no problem to do it, its easy as well you put it in a public var.
But now im trying to get it after a Adapter update.
Easy code:
- Binding addnew
- A form filled from scrath, with binding to a ds.
- Binding endupdate
- TableAdaptor Update
- And then...
Dunno whats the best way to get the last inserted id form there, think it should be easy but cant find solution, thinking i dont wanna do a ugly code doing a nasty select.. etc...
Can you show me the light and give me the best easier solution for it, thinking that it can be a multiuser app.
Thanx in advance,