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
xmail123
NA
10
0
How to refresh the DataSet after a data source update
Jul 2 2004 12:04 PM
After updating my data source using the DataAdapter.Update method I want to refresh the DataSet by repopulating it. There are apparently 2 approaches to accomplishing this. Approach 1 Refresh a dataset manually by calling an adapter's Fill method after calling its Update method. When I call the fill after the update the rows are appended to the data table. The data table is not over written as I expected. I have to do a Clear then the Fill. Is there something I am missing that is preventing the data table from being over written or is explicitly calling a Clear first the correct way to do this? Approach 2 Alternatively, you can configure the data adapter to automatically execute an SQL SELECT statement or stored procedure after performing the Update. In that case, the data adapter creates two SQL statements for the UpdateCommand and InsertCommand objects. The first statement executes the update, and the second statement is a SELECT statement designed to refresh the dataset. 1. I don't see a property or something in the data adapter to enable the automatically execute of an SQL SELECT statement or stored procedure after performing the Update. 2. In order for the second SELECT statement to execute, the data source must support batch queries as in SQL Server. How do I set that up?
Reply
Answers (
1
)
comboBox items from access table?
how to update primary key?