"Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader "Fun" with SQLCEDataReader "Fun" with SQLCEDataReader "Fun" with SQLCEDataReader "Fun" with SQLCEDataReader "Fun" with SQLCEDataReader "Fun" with SQLCEDataReader "Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader "Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader
Go Back  Xtreme Visual Basic Talk > > > "Fun" with SQLCEDataReader


Reply
 
Thread Tools Display Modes
  #1  
Old 02-09-2005, 01:03 AM
skyrender skyrender is offline
Newcomer
 
Join Date: Nov 2004
Posts: 18
Talking "Fun" with SQLCEDataReader


Allright, perhaps this question may sound a bit silly, but is there any way to backtrack with an SQLCEDataReader object? I would like to run a single SQL query, store the result in a SQLCEDataReader object, then later traverse (forward and backward) through the reader to find the data I need. The only other solution I can think of would be to copy the entire contents of the reader over to an array. However, this would require an extra step, which is a bad thing since I'm going for effieciency here. Any suggestions?
Reply With Quote
  #2  
Old 02-11-2005, 05:40 PM
MKoslof's Avatar
MKoslof"Fun" with SQLCEDataReader MKoslof is offline
Cum Grano Salis

Retired Moderator
* Guru *
 
Join Date: Jul 2002
Location: Baltimore, Maryland
Posts: 14,636
Default

I don't think you can do this with a dataReader. You can store your resultset in a class and loop the collection at any point. You could use an ArrayList an Array a DataSet, etc. A DataReader can be loop until EOF, or you can read it backwards (from end to start), but once you have finished evaluating the resultset, you need to reassign the object to another command declaration..you can't go back through it a second time, since it doesn't remember your resultset once it is finished.
__________________
"Artificial Intelligence is no match for natural stupidity." ~unknown
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
"Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader "Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader "Fun" with SQLCEDataReader "Fun" with SQLCEDataReader "Fun" with SQLCEDataReader "Fun" with SQLCEDataReader "Fun" with SQLCEDataReader "Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader
 
"Fun" with SQLCEDataReader
"Fun" with SQLCEDataReader
 
-->