It is hard to answer this question without looking at the surrounding
code.Is this ADO.NET 1.1? Because if it is not, you can't have two
datareaders coming from the same connection.
What are the chances that you might be able to replicate the below in a
simple ConsoleApp, and paste that on the newsgroup here.
- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
http://blogs.apress.com/authors.php?author=Sahil Malik
"MN" <(E-Mail Removed)> wrote in message
news:1139760F-7B7F-475D-802A-(E-Mail Removed)...
> Hello all -
>
> I'm at wits end with this and I'm sure I'm doing something wrong but can't
> figure out why. I have this loop below.
>
> 'OldPlayersReader skips (1st to 3rd to 5th)
> While pastDeadlineReader.Read And oldPlayersReader.Read
> If oldPlayersReader Is Nothing Then
> 'If nothing set to blank.
> strName = ""
> Else
> 'Set value from OldPlayersReader to strName
> strName = Convert.ToInt32(oldPlayersReader.GetValue(1))
> End If
> End While
>
> So basically I have 2 readers that need to stay in sync with each other
and
> move along at the same time. Both will have 5 records in them always but
I
> need to do comparative checks in case values from OldPlayersReader need to
be
> used. The first time it goes through this loop, the first records are
> compared but when it comes back up again, the first (pastDeadlineReader)
> reader is on the 2nd record and the OldPlayersReader is on the 3rd record,
> past the 2nd record.
>
> What am I doing wrong?
>
> Much thanks,
> MN