|
-
May 1st, 2007, 11:04 PM
#1
Thread Starter
Fanatic Member
Record pointer...
Hello...
I guess the record's movement is such a simple stuff to do. But I couldn't find it in C# so far.
Someone can tell me on how to move a record in C# ?
(such as movefirst, movenext, movelast, moveprevious) ???
Cos, as far as I learned this C# for the last 1 week, I only know "datareader.read()" to move record from the beginning to the EOF.
Thanks....
-
May 1st, 2007, 11:22 PM
#2
Re: Record pointer...
There are no such methods with a DataReader. The idea of the DataReader is that you read each record in turn from first to last.
If you want random access to data then you get it all into a local store first, which will normally be a DataTable. You would do that by calling the DataTable's Load method and passing a DataReader or else calling the Fill method of a DataAdapter. You can then access any field of any record you like. Navigating a DataTable has no meaning. If the DataTable is bound to UI controls, then the user can navigate the data they are viewing. You can use a BindingNavigator to provide that functionality to the user.
-
May 1st, 2007, 11:28 PM
#3
Thread Starter
Fanatic Member
Re: Record pointer...
hmmm...
do u mind giving me a simple sample on how to do this ?
I really a newbie on this language.
Thanks
-
May 2nd, 2007, 12:17 AM
#4
Re: Record pointer...
I strongly suggest working through one or more ADO.NET tutorials.
http://www.google.com.au/search?q=%2...ient=firefox-a
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|