Link to home
Start Free TrialLog in
Avatar of Harsh08
Harsh08

asked on

.Absolute Page = -1

SQL 2k : VB6 :

I m using Stored Procedure to Retrieve the query Result


Results :

RecordSet.AbsolutePage = -1
"With cmd
            .ActiveConnection = Con
            .CommandType = adCmdStoredProc
            .CommandText = "Ledger"
            .Parameters.Append cmd.CreateParameter("@AccountNo", adInteger, adParamInput, , AccountNo)
            .Parameters.Append cmd.CreateParameter("@FromDate", adDate, adParamInput, , FromDate)
            .Parameters.Append cmd.CreateParameter("@ToDate", adDate, adParamInput, ,ToDate)
            .Parameters.Append cmd.CreateParameter("@Ledger_Type", adInteger, adParamInput, , LEDGER_TYPE)
            .Parameters.Append cmd.CreateParameter("@Criteria", adVarChar, adParamInput, 100, "")
            .Parameters.Append cmd.CreateParameter("@UserID", adInteger, adParamInput, , User.UserId)
            
            
            If Err.Number = 0 Then
            End If
            Set ARS= Nothing
            ARS.CursorLocation = adUseClient
            
            Set ARS= cmd.Execute
        End With
END

Open in new window

Avatar of Andrew Crofts
Andrew Crofts
Flag of Ukraine image

The Recordset is empty, the current position is unknown,  or not supported by the provider
Avatar of Anthony Perkins
As andycrofts has indicated the recordset is a firehose (forward-only, read-only) cursor and does not support that property.  But don't take my word for it, you can confirm this yourself, just do:

MsgBox "Supports AbsolutePage: " & CBool(ARS.Supports(adApproxPosition))
Avatar of Harsh08
Harsh08

ASKER

Thanks,

Supports AbsolutePage: False.

What do you suggest?

ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Harsh08

ASKER

Thanks. I had to change the code to Recordset Open Method.