System.NullReferenceException: 'Object reference not set to an instance of an object.' dt fue Nothing. en visual basic
Try Dim lc As New LClientes Dim dt As DataTable = lc.Consultar(TxtNumId.Text) Dim dr As DataRow = dt.Rows.Item(0) TxtIdCliente.Text = dr.Item("ID_CLIENTE") TxtNombre.Text = dr.Item("NOMBRE") TxtTelefono.Text = dr.Item("TELEFONO") Catch ex As Exception MsgBox("El cliente no existe") End Try
Dim dt As DataTable = lc.Consultar(TxtNumId.Text)
dt
null
lc.Consultar
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)