pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Page <dpage@vale-housing.co.uk>
To: Ludek Finstrle <luf@pzkagis.cz>
To: Thomas Chabaud <tc@geosys.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Annoying problem with UseDeclareFetch
Date: Thu, 01 Dec 2005 20:47:20 +0000
Message-ID: <BFB511D8.6C37%dpage@vale-housing.co.uk> (raw)
In-Reply-To: <20051201200931.GB16735@soptik.pzkagis.cz>




On 1/12/05 8:09 pm, "Ludek Finstrle" <luf@pzkagis.cz> wrote:

>> I'm using VB 6.0 with postgreSQL v8.0 and ODBC Driver v8.1.1.
>> I have set the driver's option UseDeclareFetch to true in order to avoid
>> recordset paging problem, but with this option enabled, rs.RecordCount
>> is always equal to -1.
> 
> Yes. It do it this way.
> 
>> Is it normal ?
> 
> It made older versions too becouse driver (with UseDeclareFetch turned
> on) change SELECT .. to DECLARE CURSOR FOR SELECT ...
> This SQL command return ok (no recordcount). Then is called fetch
> which get max "cache size" (in Data Source options) rows and
> backend return fetched count.
> It's need whole rewrite of psqlodbc to solve this problem.

Rewriting psqlODBC won't help. When you use declare/fetch the driver simply
doesn't know how many rows there are until it's fetched them all, nor does
it have any way of getting that info.

Regards, Dave 





view thread (4+ messages)

Message-ID: <BFB511D8.6C37%dpage@vale-housing.co.uk>
Permalink:  ../BFB511D8.6C37%25dpage@vale-housing.co.uk/
Also on:    postgresql.org/message-id/BFB511D8.6C37%dpage@vale-housing.co.uk

 · 

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: dpage@vale-housing.co.uk, luf@pzkagis.cz, tc@geosys.com
  Subject: Re: Annoying problem with UseDeclareFetch
  In-Reply-To: <BFB511D8.6C37%dpage@vale-housing.co.uk>
  References: <20051201200931.GB16735@soptik.pzkagis.cz> <BFB511D8.6C37%dpage@vale-housing.co.uk>

* 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