Creo una conexion, y al hacer selects, el recordset SIEMPRE viene vacio (EOF en true). Los inserts los hace bien. Ejemplo del codigo:
Código:
y si en vez de abrilo con el command.execute, lo abro con el recordset.open (Dim cmdLocal As New ADODB.Command Dim rsLocal As New ADODB.Recordset Dim cnLocal As ADODB.Connection Set cnLocal = New ADODB.Connection cnLocal.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\Lis\Seguros\base1.mdb ;" cnLocal.Open Set rsLocal = New ADODB.Recordset Set cmdLocal = New ADODB.Command With cmdLocal .ActiveConnection = cnLocal .CommandType = adCmdText .CommandText = "SELECT * FROM Caja " Set rsLocal = .Execute Debug.Assert rsLocal.RecordCount <> -1 End With Set cnLocal = Nothing Set cmdLocal = Nothing Set rsLocal = Nothing
Código:
) lo HACE BIEN. El tema es que necesito hacerlo con el command, porque tengo muchas consultas que ncesitan parameters.rsLocal.Open "select * from caja", cnLocal, adOpenStatic, adLockBatchOptimistic
Agradezco cualquier ayuda.