Getting id of inserted row


/ Published in: C#
Save to your folder(s)

In DB.GetData(select) is executed
new SqlDataAdapter(Select, dbConnection).Fill(table)


Copy this code and paste it in your HTML
  1. DataTable table = DB.GetData(@"INSERT INTO [table_name] VALUES(values) SELECT id = SCOPE_IDENTITY()");

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.