Home All Groups Group Topic Archive Search About
Author
9 Jan 2006 6:50 AM
WilliamMomo
i am the beginner of VB.NET. At the vb6 if i want to move the record at the
ado, i can use the following code : adoStudent.movenext.

At the VB.NET how can i do ? If i have a dataset call dsLoginCheck ?

Author
9 Jan 2006 7:39 AM
Armin Zingler
"WilliamMomo" <WilliamM***@discussions.microsoft.com> schrieb
> i am the beginner of VB.NET. At the vb6 if i want to move the record
> at the ado, i can use the following code : adoStudent.movenext.
>
> At the VB.NET how can i do ? If i have a dataset call dsLoginCheck ?

ADO.Net is still incomplete. You can not navigate through all records using
MovePrevious/MoveNext. You either have to load the whole table completely
into memory (often impossible or inacceptable with thousands of records), or
load all the PKs and execute a Select-SQL using the PK of the "current
record" to navigate.

see also:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconaccessingdatawithadonet.asp

in particular:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconcreatingusingdatasets.asp

Better group to ask ADO.Net related (language unrelated) questions:
microsoft.public.dotnet.framework.adonet


Armin
Author
9 Jan 2006 8:28 AM
Cor Ligthert [MVP]
WilliamMomo,

Be aware that a datases is a wrapper around datatables which you can compare
with recordsets (although a dataset/datatable is disconnected)

The movenext etc through a datatable in .Net is much easier than it was with
Ado

First to address your table
dim dt as datatable = dsLoginCheck.Tables(0)

dt.rows(0) is the first
dt.rows(0+1) is the next row
dt.rows(dt.rows.count-1) is the last

etc think about it yourself what an endless posibilities you have with this

I hope this helps,

Cor