Emmanuel,
You need to execute a query (SqlCommand) against the server to find the
value. Algo de este':
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Try ' Trap problems during the open
cn = New SqlConnection("server=demoserver;database=biblio;integrated
security=sspi")
CInt(txtIDToTest.text)
Dim strAuthor As Object
cn.Open()
strAuthor = cmd.ExecuteScalar
If strAuthor Is Nothing Then
MsgBox("No such ID")
Else
MsgBox("ID found")
End If
Catch ex As Exception
MsgBox(ex.ToString)
Finally
cn.Close()
End Try
End Sub
--
________________________________
William (Bill) Vaughn, Author, Trainer, Mentor
Microsoft Pacwest Regional Director, MVP
"ADO.NET and ADO Examples and Best Practices for VB Programmers--2nd
Edition" (ISBN: 1-893115-68-2)
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
________________________________
Quote:
> hello i need your help im working in vbnet and want to know how can i
> validate a textbox vs a table made in sql server 2000?
> Thanks