- Apr 5, 2002
- 2,603
- 89
- 91
I am trying to do an insert operation into my DB.
I have already open an connection and have read through the DB and have not found the hole cards in the DB.
Now I want to insert using variables the hand, my ranking, time played and times won.
string nine = "9";
int zero = 0;
SqlCommand insertCommand = new SqlCommand("INSERT into GetHoleCardRank (HoleCards, Rank, HandsPlayed, HandsWon)" + "VALUES (temp.ToString(), nine.ToString(), zero.ToString(), zero.ToString())");
I am throwing an "Invalid operation exception" on the following line.
insertCommand.ExecuteNonQuery();
I have already open an connection and have read through the DB and have not found the hole cards in the DB.
Now I want to insert using variables the hand, my ranking, time played and times won.
string nine = "9";
int zero = 0;
SqlCommand insertCommand = new SqlCommand("INSERT into GetHoleCardRank (HoleCards, Rank, HandsPlayed, HandsWon)" + "VALUES (temp.ToString(), nine.ToString(), zero.ToString(), zero.ToString())");
I am throwing an "Invalid operation exception" on the following line.
insertCommand.ExecuteNonQuery();