how i can know if the phone number exist in ms database or not ?
I'm using this code but i have error , i think i need to get all phone number as array and search in array if the number exist or not .
Dim number As String
con.Open()
Dim sql As String = "select cphone from cust "
Dim cmd As New OleDbCommand(sql, con)
Dim dr As OleDbDataReader
dr = cmd.ExecuteReader
While dr.Read
number = dr(5)
End While
con.Close()
If TextBox5.Text = number Then
MsgBox("exist")
Else
MsgBox("NOT-exist")
End If
but i think there is easy way to do this , any help please