SqlConnection con2 = new SqlConnection(connStr);
SqlCommand SQLCmd2 = new SqlCommand("SPAddKW", con2);
SQLCmd2.CommandType = System.Data.CommandType.StoredProcedure;
SQLCmd2.Parameters.AddWithValue("@AWGID", (row["AWGID"]));
SQLCmd2.Connection.Open();
SQLCmd2.ExecuteNonQuery();
// something like this to store the recently inserted key
// but this does not work
int NewID;
NewID = SQLCmd2.Execute("SELECT @@IDENTITY");
SQLCmd2.Connection.Dispose();
|