1
« en: Lunes 8 de Abril de 2002, 23:54 »
si estas usando VB6 sesria algo como esto:
Dim Cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim Rs1 As New ADODB.Recordset
If Cn.State = adStateOpen Then Set Cn = Nothing
Cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "dataPlaneacion.mdb"
Cn.CursorLocation = adUseClient
Cn.Open
If rs.State = adStateOpen Then Set rs = Nothing
rs.ActiveConnection = Cn
rs.Open "select * from bd", Cn, adOpenDynamic, adLockBatchOptimistic
For i = 0 To (rs.Fields.Count - 1)
If Not IsNull(rs(i)) Then
TxtTexto(i).Text = rs(i)
Else
TxtTexto(i).Text = ""
End If
Next
If Rs1.State = adStateOpen Then Set Rs1 = Nothing
Rs1.ActiveConnection = Cn
Rs1.Open "select * from bd", Cn, adOpenDynamic, adLockBatchOptimistic