Foros del Web » Programación para mayores de 30 ;) » Programación General » Visual Basic clásico »

adaptar codigo ado a dao

Estas en el tema de adaptar codigo ado a dao en el foro de Visual Basic clásico en Foros del Web. aluien me puede ayudar a adaptar este codigo a dao??? gracias Private Sub Form_Load() Connex.CursorLocation = adUseClient Connex.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & "Data Source=Base.mdb;Persist Security Info=False" ...
  #1 (permalink)  
Antiguo 04/05/2007, 19:13
 
Fecha de Ingreso: febrero-2004
Mensajes: 29
Antigüedad: 20 años, 3 meses
Puntos: 0
adaptar codigo ado a dao

aluien me puede ayudar a adaptar este codigo a dao??? gracias


Private Sub Form_Load()
Connex.CursorLocation = adUseClient
Connex.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & "Data Source=Base.mdb;Persist Security Info=False"
' & ";" & "Jet OLEDB:Database Password=CONTRASEÑA" ' Si quieres ponerla
With rsClie
If .State Then .Close
.Open "SELECT * FROM Tabla Order by Nombre", Connex, adOpenStatic, adLockOptimistic
If .RecordCount Then VerGridClie
End With

End Sub

Private Sub Form_Resize()
txtclie.SetFocus
End Sub

Private Sub txtclie_GotFocus()
txtclie.SelStart = 0
txtclie.SelLength = Len(txtclie)

End Sub

Private Sub txtclie_Change()
On Local Error Resume Next
With rsClie
If .State Then .Close
.Open "Select * From tabla Where Nombre like '%" & txtclie.Text & "%' Order by Nombre", Connex, adOpenStatic, adLockOptimistic
If .RecordCount = 0 Then
MsgBox ("Parece existir un carácter erróneo" & Chr(10) & _
"en el nombre de este cliente.")
txtclie = Left(txtclie, Len(txtclie) - 1)
Exit Sub
End If
End With

VerGridClie
DoEvents
txtclie.SetFocus
End Sub

Private Sub VerGridClie()
With DGClie
.Visible = True
Set .DataSource = rsClie
.Refresh
.Caption = "LISTADO DE CLIENTES"
.AllowUpdate = False
.Splits(0).AllowRowSizing = False
End With
End Sub


Private Sub DGClie_DblClick()
Form2.Text1.Text = DGClie.Columns(1).Text
End Sub


Private Sub Command1_Click()
Form2.Show vbModal
End Sub
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:27.