Private Sub btnBuscar_Click(sender As Object, e As EventArgs) Handles btnBuscar.Click Try Dim str As String ' str = string "string" str = "SELECT * FROM tblClientes WHERE (NumId = " & txtNumID.Text & ")" 'Instruccion de SQL 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 'mensaje en caso de error; MsgBox("No se encontro la informacion") End Try miConeccion.Close() End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)