Advertisement

06.02.2008 at 04:05PM PDT, ID: 23451628
[x]
Attachment Details

how to search DataReader (c# .net)

Asked by sacvb in Microsoft Visual C#.Net

Tags: C# web.net

I have an array of itemIDs:  5, 7, 8, 1, 2, 4, ... (itemID is indexed field in my table tblTest)

I need to open DatarRader and read records in the given order.
What is an efficient way to do this?

My first thought was to create DataReader for each ItemID (place everything in foreach loop). That seems not efficient to me.

I was looking around for Seek method (to open DataReader and use Seek to navigate through records in above order), and I found that SqlCeDataReader object has this method, but couldn't figure out how to register it and use it in my project. I am not even sure if I am supposed to use it.
 
Thanks.
Start Free Trial
[+][-]06.02.2008 at 11:04PM PDT, ID: 21697894

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 12:41PM PDT, ID: 21703808

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 09:47PM PDT, ID: 21707028

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual C#.Net
Tags: C# web.net
Sign Up Now!
Solution Provided By: anuragal
Participating Experts: 2
Solution Grade: B
 
 
[+][-]06.04.2008 at 12:38AM PDT, ID: 21707696

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 08:35AM PDT, ID: 21711152

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628