I'm trying to get a record by using the Id from the client but it keeps telling me no record found
here is the code:
Private Sub btnBuscar_Click(sender As Object, e As EventArgs) Handles btnBuscar.Click
Try
Dim str As String
str = "SELECT * FROM tblClientes WHERE (NumId = " & txtNumID.Text & ")"
Dim comando As OleDbCommand = New OleDbCommand(str, miConeccion)
dataReader = comando.ExecuteReader
While dataReader.Read()
txtNombre.Text = dataReader("Nombre").ToString
txtApe.Text = dataReader("Apellido").ToString
txtCiudad.Text = dataReader("Ciudad").ToString
txtNumT.Text = dataReader("Telefono").ToString
txtSS.Text = dataReader("Seguro Social").ToString
txtZipCode.Text = dataReader("ZipCode").ToString
End While
Catch ex As Exception
MsgBox("No se encontro la informacion")
End Try
miConeccion.Close()
End Sub
I'm not used to VB most of the time I use C# and I do not know if it's a bracket thing or something else, Thank You