|
-
Mar 27th, 2003, 04:10 PM
#1
Thread Starter
Frenzied Member
Refreshing a DataSet
Searched for this, but could not find.
I have a windows form with data bound controls. Typical first, next, last etc buttons to move through the records. User can create a record and update the DB, via dataadapter.update.
Wondering what is the preferred method of updating the client's view? For example, I'm displaying an identity colum and need the database-created value.
Just fill the dataset again with the same table name after re-populating the dataadapter? Somehow truncate the table in the dataset first? Any thoughts appreciated.
Mike
-
Mar 27th, 2003, 06:23 PM
#2
Frenzied Member
You can probably just fill the dataset again then bind it again to the controls.
Dont gain the world and lose your soul
-
Mar 27th, 2003, 06:51 PM
#3
Thread Starter
Frenzied Member
Not sure if this is the best method, but it seems to work. If you call the dataadapter.fill on a table that's already in the dataset, the information appends to the dataset's table, so it looks like you have to clear it first.
So I cleared it, got the data again, filled the dataset, then moved to the row I just created.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|