J
Jason
I am pretty new to .NET, so can someone tell me why this doesn't work?
It does not throw any exception but it doesn't update the record in the
table either. All variables are populated correctly and the record
DOES exist!
Thanks in advance!
SqlConnection loConnection = new SqlConnection(<connection string
here>);
SqlCommand loCommand = loConnection.CreateCommand();
loCommand.CommandText = "UPDATE NewUser SET Name = '" + lsName + "'
WHERE NewUserID = " + liNewUserID;
loConnection.Open();
SqlDataReader loDataReader = loCommand.ExecuteReader();
loDataReader.Read();
loDataReader.Close();
loConnection.Close();
It does not throw any exception but it doesn't update the record in the
table either. All variables are populated correctly and the record
DOES exist!
Thanks in advance!
SqlConnection loConnection = new SqlConnection(<connection string
here>);
SqlCommand loCommand = loConnection.CreateCommand();
loCommand.CommandText = "UPDATE NewUser SET Name = '" + lsName + "'
WHERE NewUserID = " + liNewUserID;
loConnection.Open();
SqlDataReader loDataReader = loCommand.ExecuteReader();
loDataReader.Read();
loDataReader.Close();
loConnection.Close();