I have this code that Deletes a record by its IP address inputted by the user. How do you check if that record is available? how do evaluate first that the IP address inputted is not in the database before deleting anything? in vb 6.0 I used to do this line:

If rs.EOF And rs.BOF Then

but it doesn't work anymore in vb 2008

delete IP Code:
  1. If TextBox1.Text = "" Then
  2.                     MsgBox("Input IP Address", MsgBoxStyle.OkOnly, Title:="")
  3.                 Else
  4.                     Dim myConnection As OleDbConnection = New OleDbConnection
  5.                     Dim myCommand As OleDbCommand = New OleDbCommand
  6.                     myConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Network_Info.mdb"
  7.  
  8.                     myConnection.Open()
  9.  
  10.                     myCommand.Connection = myConnection
  11.                     myCommand.CommandText = "DELETE * from Computer_Connection_Info WHERE IP_Address ='" & TextBox1.Text & "'"
  12.  
  13.                     myCommand.ExecuteNonQuery()
  14. End If