Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/05/2011, 03:39
kyha
 
Fecha de Ingreso: junio-2008
Ubicación: Valencia
Mensajes: 152
Antigüedad: 16 años, 7 meses
Puntos: 3
Respuesta: Cargar Filas tabla en Textbox

Dim cmd As New OleDb.OleDbCommand("SELECT descripcio,prenitat FROM productes WHERE codi_prov='" & Cbproveidor.Text & "'", conex)
Dim dr As OleDb.OleDbDataReader
Dim ds As New DataSet
conex.Open()
dr = cmd.ExecuteReader
If dr.Read Then --- > Si haces un if solo te leera la primera, fila tienes que poner un while
txt1.Text = dr(0) -----> si a todos le pones el 0 solo te pondra el primer campo.
txt2.Text = dr(0) El numero en el parentesis es el número del campo ,no la
txt3.Text = dr(0) fila.
txt4.Text = dr(0)
txt5.Text = dr(0)
txt6.Text = dr(0)
txt7.Text = dr(0)
txt8.Text = dr(0)
Tbunitat1.Text = dr(1)
Tbunitat2.Text = dr(1)
Tbunitat3.Text = dr(1)
Tbunitat4.Text = dr(1)
Tbunitat5.Text = dr(1)
Tbunitat6.Text = dr(1)
Tbunitat7.Text = dr(1)
Tbunitat8.Text = dr(1)
Else
MsgBox("Error")
End If
conex.Close()