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
younis abdeljawwad
NA
73
96.7k
Error In adding to table !!
May 24 2012 3:10 PM
i try to insert to table data but an error Occurs ,,,,,my table name is "class time"
here is the code
int class_maxid = 17;
int starttime = 95;
int endtime = 200;
string courseday = "saturday";
//insert to the clas table the values
SqlCommand cmd5 = new SqlCommand("INSERT INTO class time(class_id,start_from,end_to,day)Values(@cls_id,@s_from,@e_to,@d)", cn1);
cmd5.Parameters.AddWithValue("@cls_id", class_maxid);
cmd5.Parameters.AddWithValue("@s_from", starttime);
cmd5.Parameters.AddWithValue("@e_to", endtime);
cmd5.Parameters.AddWithValue("@d", courseday);
cmd5.ExecuteNonQuery();
the error is "Incorrect syntax near 'time'."
!!!!!!
Reply
Answers (
2
)
c# winforms DataGridView - how to set SelectedRow as a CurrentRow automatically ?
Trying to filter a dropdown list