
Nombre del parámetro: dataSet"
mi codigo es el siguiente:
Código:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Try Dim bcvend As String bcvend = Trim(InputBox("Teclee nombre de Vendedor", "Busqueda")) Dim conex As New SqlConnection(ConfigurationManager.ConnectionStrings("CONEXION").ConnectionString) Dim adaptador As New SqlDataAdapter("Select * From vendedor Where @ven_des='" & bcvend.Trim & "'", conex) conex.Open() adaptador.Fill(ds, "vendedor") If ds.Tables("vendedor").Rows.Count = 0 Then MsgBox("No se encontró el registro buscado", 64, "Mensaje") Else Dim dr As DataRow dr = ds.Tables("vendedor").Rows(0) TextBox2.Text = dr("@cod_ven").ToString TextBox3.Text = dr("@ven_des").ToString TextBox4.Text = dr("@telefonos").ToString TextBox5.Text = dr("@direc1").ToString Fecha_regDateTimePicker.Text = dr("@fecha_reg").ToString TextBox6.Text = dr("@email").ToString End If conex.Close() Catch ex As Exception MsgBox(ex.Message) MsgBox("Datos consultados") End Try End Sub