MyVBBlog
Sunday, April 17, 2011
Return ID from row insert - SCOPE IDENTITY
"INSERT INTO TableName(FeildName, FeildName) VALUES (Value, Value); SELECT IDColumnName FROM TableName WHERE (IDColumnName = SCOPE_IDENTITY())"
intID = CommandObject.ExecuteScalar
http://msdn.microsoft.com/en-us/library/ms190315.aspx
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment