TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Benjamin Ashton
NA
15
7.4k
Updating SQL from C#, changing all the data
Jul 12 2012 2:23 PM
I am using the below code to try and update records within my SQL server but having problems, it is updating all the records to what I want it to change too. It would be great if someone could steer me in the right direction.
da.UpdateCommand = new SqlCommand("UPDATE userInfo SET Username = @USERNAME, Password = @PASSWORD", cs);
da.UpdateCommand.Parameters.Add("@USERNAME", SqlDbType.VarChar).Value = txtUsername.Text;
da.UpdateCommand.Parameters.Add("@PASSWORD", SqlDbType.VarChar).Value = txtPassword.Text;
cs.Open();
da.UpdateCommand.ExecuteNonQuery();
cs.Close();
dgUpdate();
Reply
Answers (
7
)
how can I restrict keyboard key from overriding the application state
Read the word in pdf file