Results 1 to 8 of 8

Thread: Can I search a DataReader? (RESOLVED)

Threaded View

  1. #1

    Thread Starter
    Addicted Member AlvaroF1's Avatar
    Join Date
    Sep 2002
    Location
    SP - Brazil
    Posts
    200

    Question Can I search a DataReader? (RESOLVED)

    Based on the code:

    VB Code:
    1. Dim myConnection As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=myDatabase.mdb")
    2. Dim myCommand As New OleDb.OleDbCommand("SELECT * FROM myTable WHERE Name='Alvaro'")
    3. Dim myDataReader As OleDb.OleDbDataReader
    4. myConnection.Open()
    5. myDataReader = myCommand.ExecuteReader
    Is there a way to search the records stored in myDataReader?
    Like:

    VB Code:
    1. myDataReader.Select("LastName='F1'")
    2. If myDataReader.NoMatch Then
    3.     MsgBox("Found.")
    4. Else
    5.     MsgBox("Not found.")
    6. End If
    Thanks.
    Last edited by AlvaroF1; Sep 16th, 2003 at 03:47 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width