Lista, una pregunta:

 

            Puede ser que el MaxRecords, no funcione en VB6 (SP4) para
Access ?

 

            Hago el siguiente ejemplo tomado del MSDN, en Access y no
funciona.

 

            Muchas Gracias !!!

 

Public Sub MaxRegistros()
 
   Dim rstTemp As ADODB.Recordset
   Dim strCnn As String
 
   strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Bases\Datos.mdb;Jet OLEDB:Database Password=;Persist Security
Info=False"
   Set rstTemp = New ADODB.Recordset
   rstTemp.MaxRecords = 1
   rstTemp.Cachesize = 1
   rstTemp.Open "SELECT Title, Price FROM Titles ORDER BY Price DESC",
strCnn, , , adCmdText
 
   ' Esto me devuelve 92 registros.????
   Debug.Print "Cantidad de Registros." & rstTemp.Recordcount
 
   Do While Not rstTemp.EOF
      Debug.Print "  " & rstTemp!Title & " - " & rstTemp!Price
      rstTemp.MoveNext
   Loop
   rstTemp.Close
 
End Sub

 

Responder a