.net 3.5 - Get auto_increment ID from SQL Compact Edition -


I am prototyping an app using a SQL compact version on ASP.NET MVC and VS2008. I have 2 entities who have many relationships with each other when I save the objects through the hands of the hand made SQL, so I have to figure out how much their ID is, therefore I can leave the record in the mapping table between two entities. The Auto_increment ID field is actually the only unique identifier for tables, after my joining, how do I reload the record and get the newly assigned ID?

RE: Code is state-of-the-art, I am using Biltin SculsiConnection, SqlCeCommand, and SqlCeDataReader objects from the .NET 3.5 library.

Use "SELECT @@ IDENTITY" in a later call.

Compact is a user access that you do not have to worry about transactions etc.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -