None of the collection classes that make up the ADO.NET disconnected model, be it 
DataSet, DataView, or DataTable have a notion of built-in currency (as the ADO 
Recordset did, eg, MoveNext). You declare a notion a currency from the outside 
(declare of variable "i" as use it as a currency pointer yourself, MoveNext is 
equivalent to i++).

Given the concept of the "i-th" DataRow of a DataTable you can, however, fetch the 
children or parent of that DataRow.

The XmlDocument, OTOH, has a notion of currency, as the APIs and the XPath query model 
are currency-based rather than set-based. XPathNavigator even has a method called 
"MoveToNext".

Bob Beauchemin
[EMAIL PROTECTED]

-----Original Message-----
From: Curtis Koppang [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 9:09 AM
To: [EMAIL PROTECTED]
Subject: [DOTNET] ADO.NET: Current row for a DataView?


Sorry for the cross-post from DOTNET-CLR, not sure how many folks are over
there yet...

If I am passed in a DataView, is there any way to tell what the current
row is?

Here is what I want to be able to do (semi psuedo code)...

class Foo
{
...
   public string GetName(DataView dv)
   {
      long x = dv.CurrentRow;  // ????

      return dv.Table.Rows[x]["au_fname"];
   }
...
}

Thanks in advance for any help,
curt

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to