Thread: 8.1.1: recordset-paging severerly broken!

8.1.1: recordset-paging severerly broken!

From
Date:
hi list
 
using pgsql 8.1 and odbc driver 8.1.1, the recordset paging is broken severerly!
only the first 100 records are returned. the 101th record is the 1st record again instead of the real 101th record from the db. when using a pagesize of 15, the following happens:
 
page1:
---------
record 1
record 2
record 3
...
 
page2:
---------
record 16
record 17
...
 
page 7:
---------
record 91
record 92
record 93
record 94
record 95
record 96
record 97
record 98
record 99
record 100
record 1  <--- here, instead of receving record 101, the odbc driver restarts from the beginning!
record 2
record 3
record 4
record 5
 
page 8:
---------
record 6
record 7
record 8
....
 
and so on...
the pagecount (in my case: 64 pages with total 954 records) is accurate. also when runing the query on the db itself all records are reutrned properly. therefore the odbc driver seems to mess things up big time!
 
below you find the simplified code used to initiate paging.
 
Set rsRecords = Server.CreateObject("ADODB.Recordset")
 
rsRecords.CursorLocation = adUseClient
rsRecords.PageSize = 15 ' set pagesize
rsRecords.Open strQuery, dbConn, adOpenKeyset
 
rsRecords.AbsolutePage = lPage  ' here we jump to the selected pages
lCount = 0
do until rsRecords.EOF or (lCount = cF_ThreadsPerPage)
  lCount = lCount + 1
  response.write rsRecords("id")
  rsRecords.MoveNext 
loop
rsRecords.Close
the problem is in both UNICODE and ANSI version of the driver.
a quick fix or workaround would be very much appreciated!
 
thomas

Re: 8.1.1: recordset-paging severerly broken!

From
"Dave Page"
Date:
 


From: pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of me@alternize.com
Sent: 09 November 2005 14:53
To: pgsql-odbc@postgresql.org
Subject: [ODBC] 8.1.1: recordset-paging severerly broken!

hi list
 
using pgsql 8.1 and odbc driver 8.1.1, the recordset paging is broken severerly!
only the first 100 records are returned. the 101th record is the 1st record again instead of the real 101th record from the db. when using a pagesize of 15, the following happens: 
 
Argh! So wrapped up in fixing use declare/fetch that none of us noticed that non-declare/fetch mode broke :-(
 
I've committed a fix for this, thanks for the report. Would you like a test DLL to try? Alternatively, try turning Use Declare/Fetch on.
 
Regards, Dave
 
 

Re: 8.1.1: recordset-paging severerly broken!

From
Date:
hi dave
 
how does one turn on use declare / fetch?
 
and yes, if you got a dll i'll happily test it
 
cheers,
thomas
----- Original Message -----
From: Dave Page
Sent: Wednesday, November 09, 2005 4:32 PM
Subject: RE: [ODBC] 8.1.1: recordset-paging severerly broken!

 


From: pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of me@alternize.com
Sent: 09 November 2005 14:53
To: pgsql-odbc@postgresql.org
Subject: [ODBC] 8.1.1: recordset-paging severerly broken!

hi list
 
using pgsql 8.1 and odbc driver 8.1.1, the recordset paging is broken severerly!
only the first 100 records are returned. the 101th record is the 1st record again instead of the real 101th record from the db. when using a pagesize of 15, the following happens: 
 
Argh! So wrapped up in fixing use declare/fetch that none of us noticed that non-declare/fetch mode broke :-(
 
I've committed a fix for this, thanks for the report. Would you like a test DLL to try? Alternatively, try turning Use Declare/Fetch on.
 
Regards, Dave