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
Cris Abella
NA
6
2.8k
Update to MSSQL database failed.
Jan 31 2014 8:33 AM
Hello everybody please consider me as a newbie in C# and I am much willing to learn this language. This is first time I've join the community.
why update to mssql database failed.
mssql table
custId = int(autoincrement)
custname = varchar(30)
SqlConnection con = new SqlConnection("Data Source=CRIS-PC\\SQLEXPRESS;Integrated Security=True;Initial Catalog = POS");
SqlCommand command = new SqlCommand("Update customers set custname = @custname where custid = @custId)", con);
command.Parameters.AddWithValue("@custname",txtName.Text);
command.Parameters.AddWithValue("@custId",Convert.ToInt32(txtCustId.Text));
thank in advance.
Cris
Reply
Answers (
3
)
Data is inserted in database before submit button
How do i hide sub menu items of toolstrip