Loading a sigle row, then updating it

  • Thread starter Thread starter Sam Martin
  • Start date Start date
S

Sam Martin

Can anyone give me "the" best way (or at least the intended way) or loading
a single row into a dataset
then updating it.

You surely don't have to fill a dataset then only update a single row
locally do you?

TIA

Sam Martin
 
Hi Sam,

Fill a single row in dataset and then do it again for refreshing.
It should work as long there is a primary key defined.
 
so basically - change the select command's sql to only pull back the row i'm
interested in.
then use the update method.

to refresh the row, simply fill the dataset again?

thanks

sam


Miha Markic said:
Hi Sam,

Fill a single row in dataset and then do it again for refreshing.
It should work as long there is a primary key defined.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

Sam Martin said:
Can anyone give me "the" best way (or at least the intended way) or loading
a single row into a dataset
then updating it.

You surely don't have to fill a dataset then only update a single row
locally do you?

TIA

Sam Martin
 
Hi Sam,

Sam Martin said:
so basically - change the select command's sql to only pull back the row i'm
interested in.
then use the update method.
Update?

to refresh the row, simply fill the dataset again?

Yep.
 
Ah, you are also updating it.
You might place the select statement immediately after update statement if
your database supports it (then there is no need to refresh with Fill)
What database are you using?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

Sam Martin said:
so basically - change the select command's sql to only pull back the row i'm
interested in.
then use the update method.

to refresh the row, simply fill the dataset again?

thanks

sam


Miha Markic said:
Hi Sam,

Fill a single row in dataset and then do it again for refreshing.
It should work as long there is a primary key defined.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

Sam Martin said:
Can anyone give me "the" best way (or at least the intended way) or loading
a single row into a dataset
then updating it.

You surely don't have to fill a dataset then only update a single row
locally do you?

TIA

Sam Martin
 
Back
Top