G
Guest
I'm trying to get the id of last row entered. The column is INT, but it
errors out saying 'Specified cast is not valid.'...
command.text = "SELECT @@IDENTITY FROM tablName";
SqlDataReader oRD = command.ExecuteReader();
while (oRD.Read())
{
Response.Write ("<BR> identiti is " + oReader.GetInt32(0).ToString());
}
What am I doing wrong?
Thnx
errors out saying 'Specified cast is not valid.'...
command.text = "SELECT @@IDENTITY FROM tablName";
SqlDataReader oRD = command.ExecuteReader();
while (oRD.Read())
{
Response.Write ("<BR> identiti is " + oReader.GetInt32(0).ToString());
}
What am I doing wrong?
Thnx