Hi all,

I'm doing something really simple with my datarows:

Dim DIAL As DataTable
DIAL = DS.Tables("Dial")

' Define the whereClause as a string to select the record by refno
Dim whereClause As String = ("refno = " + CType(Me.refno, String) _
+ " AND campaignID = " + CType(Me.campaignID, String))

' Define an array of DataRows to hold the results of the query.
Dim DR() As DataRow
DR = DIAL.Select(whereClause)


Sometimes DR.Length returns > 1... BUT, the dataset is GUARANTEED to have
only 1 reference number that matches (I checked the database).

So my question is - how come DataTable.Select returns more than one
row... when in case there should be only one matching row?

Unfortunately this error happens rarely (once every 2500 - 3000
iterations)... so i can't use a debugger to reproduce it easily.


--
Lucas Tam (REMOVEnntp@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Re: DataRow.Select Weirdness! by One

One
Tue Aug 19 02:18:32 CDT 2003

Sounds like a bug 2 me !


"Lucas Tam" <REMOVEnntp@rogers.com> wrote in message
news:Xns93DBBDAC5F048nntprogerscom@140.99.99.130...
> Hi all,
>
> I'm doing something really simple with my datarows:
>
> Dim DIAL As DataTable
> DIAL = DS.Tables("Dial")
>
> ' Define the whereClause as a string to select the record by refno
> Dim whereClause As String = ("refno = " + CType(Me.refno, String) _
> + " AND campaignID = " + CType(Me.campaignID, String))
>
> ' Define an array of DataRows to hold the results of the query.
> Dim DR() As DataRow
> DR = DIAL.Select(whereClause)
>
>
> Sometimes DR.Length returns > 1... BUT, the dataset is GUARANTEED to have
> only 1 reference number that matches (I checked the database).
>
> So my question is - how come DataTable.Select returns more than one
> row... when in case there should be only one matching row?
>
> Unfortunately this error happens rarely (once every 2500 - 3000
> iterations)... so i can't use a debugger to reproduce it easily.
>
>
> --
> Lucas Tam (REMOVEnntp@rogers.com)
> Please delete "REMOVE" from the e-mail address when replying.
> http://members.ebay.com/aboutme/coolspot18/