MyVBBlog
Showing posts with label
Return ID
.
Show all posts
Showing posts with label
Return ID
.
Show all posts
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
Older Posts
Home
Subscribe to:
Posts (Atom)