pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: me@alternize.com
To: pgsql-odbc@postgresql.org
Subject: 8.1.1: recordset-paging severerly broken!
Date: Wed, 9 Nov 2005 15:52:41 +0100
Message-ID: <0bde01c5e53d$3c736b50$0201a8c0@iwing> (raw)

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

view thread (3+ messages)  latest in thread

Message-ID: <0bde01c5e53d$3c736b50$0201a8c0@iwing>
Permalink:  ../0bde01c5e53d$3c736b50$0201a8c0@iwing/
Also on:    postgresql.org/message-id/0bde01c5e53d$3c736b50$0201a8c0@iwing

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: me@alternize.com
  Subject: Re: 8.1.1: recordset-paging severerly broken!
  In-Reply-To: <0bde01c5e53d$3c736b50$0201a8c0@iwing>
  References: <0bde01c5e53d$3c736b50$0201a8c0@iwing>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox