current row

Phylum

Well-known member
Joined
Jun 20, 2003
Messages
105
Location
Canada
I ran a dataadapter fill on a dataset. the fill causes rows to be returned. How do I return the CURRENT row? What if I navigated to the 80th record or so... how do I return the current row object?
 
Fill returns the number of rows that were added to the dataset, not an array of rows. And, if the dataset was empty before you filled it, then there wasnt a current row. But it sounds like you might want to use a currencyManager with a dataview. Clarify what youre trying to do, and maybe post some code, and hopefully well have a better sense of how to help.
 
To elaborate on ballistics note, a DataAdapter fills a DataSet. Neither the DataAdapter nor DataSet have any kind of pointer to a "current" row. You can use a CurrencyManager (a form has this built-in, to support moving Prev/Next etc.).

What do you mean by "navigate to the 80th record"? If youre already using the forms BindingContext (the built-in currency manager) to navigate, you can set its Position property to go to any row (row 0 is the first row). You can also read the Position property to get the current row.

-Nerseus
 
Back
Top