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
anji marothu
NA
45
51k
update ms access check box column
Aug 27 2013 9:24 AM
hi all.. in my ms access database am using check box column.
there is a no problem when inserting the row in the database.
but when am updating the check box column. it will show "datatype mismatch".
how can i handle this.....
here is my code...................
internal void updatestbInfo(string stbnumber, string stbname, int price, string purchasedate, string description, bool isactive)
{
cn.Close();
cn.Open();
cmd = null;
cmd = new OleDbCommand("update STBINFO set stbno=@stbno,stbname=@stbname,price=@price,purchasedate=@purchasedate,description=@description,isactive=@isactive where stbno=@stbno", cn);
cmd.Parameters.AddWithValue("@stbno", stbnumber);
cmd.Parameters.AddWithValue("@stbname", stbname);
cmd.Parameters.AddWithValue("@price", price);
cmd.Parameters.AddWithValue("@purchasedate", purchasedate);
cmd.Parameters.AddWithValue("@isactive", isactive);
cmd.Parameters.AddWithValue("@description", description);
cmd.ExecuteNonQuery();
MessageBox.Show(isactive.ToString());
cn.Close();
}
here @isactive is a checkbox column....
Reply
Answers (
1
)
Linq Query using Joins, GroupBy
Efficient way to validate data of DataTable