Okay, I'm not sure where the check is done, but if you're returning the rows
in your DataReader before the check, the HasRows property will tell you if
there are any rows that matches the criteria in your SELECT statement. If
you need it done at the data source, I suggest looking at a stored procedure
and executing it. You don't mention which data source you're using.
--
Carsten Thomsen
Communities -
http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work but
they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
"Anuradha" <an*******@lankaequities.com> wrote in message
news:uj**************@TK2MSFTNGP03.phx.gbl...
What i mean is I need to check the table and if records found I need to
update another table. I will give a example
Select * from bktrn where EPF='" & text.text & "'
If recodes found then
xxxxxxxxx
end if
how can I do this
Thx
Anuradha
"CT" <ca******@spammersgoawayintegrasol.dk> wrote in message
news:Ot**************@TK2MSFTNGP03.phx.gbl... You need to loop through the rows using the Read method and increment a
counter I'm afraid:
While reader.Read()
counter += 1
End While
--
Carsten Thomsen
Communities - http://community.integratedsolutions.dk
---------
Voodoo Programming: Things programmers do that they know shouldn't work
but they try anyway, and which sometimes actually work, such as recompiling
everything. (Karl Lehenbauer)
---------
"Anuradha" <an*******@lankaequities.com> wrote in message
news:%2***************@TK2MSFTNGP05.phx.gbl... > Dear Experts
>
> How can I count records in a data reader?
>
>
>
> Thx
>
> Anuradha
>
>
>
>
>