Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find a record in a datareader
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00855308
Message ID:
00855704
Views:
20
Winan,

You can use the Read method of the DataReader to loop through the returned records until you find the one you are searching for. There is a sample in the VS.NET help.

>Is it possible for me to find a record in a datareader .. I use below code .. (I don't want to use "Where clause in my SQL statement")
>
>Dim mKode as string
>Dim mSQLCheckData As String = "Select * from MyTable01 Order by Kode"
>Dim DataReader As SqlDataReader
>
>Dim SQLCommand As New SqlCommand(mSQLCheckData, SqlConnection1)
>
>SqlConnection1.Open()
>DataReader = SQLCommand.ExecuteReader()
>
>--
>--
>--
>
>SqlConnection1.Close()
>
>please help
>
>TIA
>
>Winanjaya
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform