阅读背景:

从SQL Compact Edition获取auto_increment ID

来源:互联网 

I am prototyping an app using ASP.NET MVC and SQL Compact Edition on VS2008. I have 2 entities that have have a many-to-many relationship with each other. When I save objects to the database through hand-crafted SQL I need to find out what their ID is so I can drop a record into the mapping table between the two entities. The auto_increment ID field is in fact the only unique identifier for the tables. So after I've done my insert, how do I re-load the record and grab the newly assigned ID?I am prototyping an app using ASP.NET MVC and S




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: