Solved

.Absolute Page = -1

Posted on 2009-07-08
5
367 Views
Last Modified: 2012-08-13
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

0
Comment
Question by:Harsh08
  • 2
  • 2
5 Comments
 
LVL 13

Expert Comment

by:Philip Pinnell
ID: 24802752
The Recordset is empty, the current position is unknown,  or not supported by the provider
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24810548
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))
0
 

Author Comment

by:Harsh08
ID: 24810673
Thanks,

Supports AbsolutePage: False.

What do you suggest?

0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 250 total points
ID: 24810692
It depends.  If performance is not paramount and you have to use AbsolutePage then consider using the Recordset Open method instead of the Command Execute method.  That will allow you to set the Cursor Type that supports AbsolutePage.
0
 

Author Closing Comment

by:Harsh08
ID: 31601040
Thanks. I had to change the code to Recordset Open Method.
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL joining table to itself to combine rows 5 31
SQL Error in WHERE Clause 5 38
T-SQL: Nested CASE Statements 4 24
SQL Server stored proc 2 10
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now