SHARE
TWEET

Untitled

Ortund Feb 27th, 2014 110 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. txtAearchResult.Text = ""
  2. Dim vSearch As String = InputBox("Enter Integer number to search name:")
  3. If vSearch <> "" Then
  4. cmdOLEDB.CommandText = "SELECT Au_ID, Author FROM Authors WHERE Au_ID= @auid"
  5. cmd.OLEDB.Parameters.AddWithValue("@auid", CInt(vSearch))
  6. cmdOLEDB.Connection = cnnOLEDB
  7.  
  8. Dim rdrOLEDB As OleDbDataReader = cmdOLEDB.ExecuteReader
  9. If rdrOLEDB.HasRows Then
  10.     Do While rdrOLEDB.Read
  11.         txtAearchResult.Text &= rdrOLEDB.Item(0).ToString & " " & rdrOLEDB.Item(1).ToString
  12.     Loop
  13.     rdrOLEDB.Close()
  14. Else
  15.     MsgBox("Record not found")
  16.     Exit Sub
  17. End If
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top