reload 1 row from database  
Author Message
Damiaan





PostPosted: .NET Framework Data Access and Storage, reload 1 row from database Top

Hi

Is it possible to reload 1 row from a sql table into a datatable

I have a DataTable filled using a table adapter. I added some queries to the datatable.
One of those queries contains a reference to a (complicated) stored procedure. This stored procedure updates a specific row.
I know the ID of the updated row and i would like to reload this row into the dataset.

I can of course clear and re-fill the datatable. But i was wondering if there wasn't a shortcut which is less stress for my sql server.

I am using Windows Forms btw.

kind regards



.NET Development2  
 
 
ahmedilyas





PostPosted: .NET Framework Data Access and Storage, reload 1 row from database Top

I'm not sure but I can think of just selecting that 1 record of data and use SqlDataReader to read the columns and store it back into the dataset, perhaps removing the row you are wanting to re-read from the dataset itself before adding/constructing this datarow from SqlDataReader.