Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Boolean updateRequest(String _VUserName, DateTime newToDate)
- {
- SqlConnection conn = getConnection();
- SqlCommand command = new SqlCommand();
- command.CommandText = "UPDATE Requests SET [To] = @ToDate FROM Requests INNER JOIN "+
- "VUsers ON Requests.UserRef = VUsers.VUserID WHERE (VUsers.VUserName = @VUserName)";
- command.Parameters.AddWithValue("@ToDate", newToDate);
- command.Parameters.AddWithValue("@VUserName", _VUserName);
- conn.Open();
- try
- {
- command.ExecuteNonQuery();
- return true;
- }
- catch (Exception)
- {
- return false;
- }
- conn.Close();
- }
Add Comment
Please, Sign In to add comment