Problem solve Get help with specific problems with your technologies, process and projects.

What is the method for updating the SQL table from a bound control?

I have a checkbox control on a Windows form. The control is bound to a SQL dataset column as a Boolean. The value from the database is displayed correctly. When the check state is changed and the dataadapter update method is called (after accept changes on dataset is called), no changes are made. When a dataadapter.fill is executed after the update, all original values are returned. No errors are generated. What is the method for updating the SQL table from a bound control? Setting the row and column data manually and the calling update also does nothing. The table only has one row of data.
You should NEVER call AcceptChanges on the dataset! It's exactly THAT method call that is telling the adapter later that there are no changes. The method is called automatically by the adapter upon successfully applying the update.

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.