Holy crap. I can’t believe I wasted 45 minutes on this stupid, stupid, mistake.
When dealing with .NET and IDbCommands, you can execute the command in various ways:
I just spent almost an hour trying to figure out why this:
//Execute command and return the primary key of the item we just insertedbase._id = Convert.ToInt32(cmd.ExecuteNonQuery());
was returning 1, always, even though the current primary key in that table is in the 90’s.
Looks like I need to get some sleep…
Now playing: Staind - Mudshovel - Winamp *** 1514. Staind - Mudshovel
I'm Ben Scheirman. I am a .NET software developer with a strong interest in agility. I work as a Principal Consultant with Sogeti.
Read more here.
email me
Ads by The Lounge
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.