Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/07/2007, 19:13
cristian.mbb
 
Fecha de Ingreso: mayo-2006
Mensajes: 35
Antigüedad: 18 años, 9 meses
Puntos: 0
Re: ayuda con base de datos

'cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & ("\bdproductora")
cn.ConnectionString = "Provider=Microsoft.Jet.OleDb.4.0;Data Source=" & Application.StartupPath & "\bdProductora.mdb"
cn.Open()

Dim strSQL As String = "SELECT Nombre, Ap_Paterno, Ap_Materno FROM tbEmpleado WHERE CodEmpleado = '" & txtRutBuscar.Text & "'"


'rs.ActiveConnection = cn
rs.Open(strSQL, cn)

' Set the text box to the value in the result
Me.txtNombre.Text = CStr(rs.Fields("Nombre").Value)
Me.txtApePat.Text = CStr(rs.Fields("Ap_Paterno").Value)
Me.txtApeMat.Text = CStr(rs.Fields("Ap_Materno").Value)


rs.Close()

me tira un error en el rs.Open(strSQL, cn)

Última edición por cristian.mbb; 02/07/2007 a las 19:14 Razón: me falto palabras