pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedAnnoying problem with UseDeclareFetch
4+ messages / 4 participants
[nested] [flat]
* Annoying problem with UseDeclareFetch
@ 2005-11-29 09:34 Thomas Chabaud <tc@geosys.com>
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Chabaud @ 2005-11-29 09:34 UTC (permalink / raw)
To: pgsql-odbc
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.
Is it normal ?
Is there a way to solve this, because my application makes a lot of
calls to rs.recordcount ? Another driver option ? Driver version ?
Thanks in advance.
Regards,
Thomas Chabaud
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Annoying problem with UseDeclareFetch
@ 2005-11-29 10:15 gunawan <gunawan@ikp.component.astra.co.id>
parent: Thomas Chabaud <tc@geosys.com>
1 sibling, 0 replies; 4+ messages in thread
From: gunawan @ 2005-11-29 10:15 UTC (permalink / raw)
To: tc@geosys.com; pgsql-odbc
----- Original Message -----
From: "Thomas Chabaud" <tc@geosys.com>
To: <pgsql-odbc@postgresql.org>
Sent: Tuesday, November 29, 2005 4:34 PM
Subject: [ODBC] Annoying problem with UseDeclareFetch
| 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.
|
| Is it normal ?
| Is there a way to solve this, because my application makes a lot of
| calls to rs.recordcount ? Another driver option ? Driver version ?
to handle this matter I prefer not to use rs. recorcount, but I use while
... wend so I can get the correct one.
another driver maybe ... should you try pgoledb.
Hope this can solve your problem ...
|
| Thanks in advance.
|
| Regards,
|
| Thomas Chabaud
|
| ---------------------------(end of broadcast)---------------------------
| TIP 6: explain analyze is your friend
|
Salut
Andi Gunawan
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Annoying problem with UseDeclareFetch
@ 2005-12-01 20:09 Ludek Finstrle <luf@pzkagis.cz>
parent: Thomas Chabaud <tc@geosys.com>
1 sibling, 1 reply; 4+ messages in thread
From: Ludek Finstrle @ 2005-12-01 20:09 UTC (permalink / raw)
To: Thomas Chabaud <tc@geosys.com>; +Cc: pgsql-odbc
> 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.
> Is there a way to solve this, because my application makes a lot of
> calls to rs.recordcount ? Another driver option ? Driver version ?
Unfortunatelly this depends only on UseDeclareFetch option.
New driver has problem with rowcount but I'll send patch for the problem
in few minutes. This patch doesn't solve your problem as I describe above.
Regards,
Luf
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Annoying problem with UseDeclareFetch
@ 2005-12-01 20:47 Dave Page <dpage@vale-housing.co.uk>
parent: Ludek Finstrle <luf@pzkagis.cz>
0 siblings, 0 replies; 4+ messages in thread
From: Dave Page @ 2005-12-01 20:47 UTC (permalink / raw)
To: Ludek Finstrle <luf@pzkagis.cz>; Thomas Chabaud <tc@geosys.com>; +Cc: pgsql-odbc
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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-12-01 20:47 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-29 09:34 Annoying problem with UseDeclareFetch Thomas Chabaud <tc@geosys.com>
2005-11-29 10:15 ` gunawan <gunawan@ikp.component.astra.co.id>
2005-12-01 20:09 ` Ludek Finstrle <luf@pzkagis.cz>
2005-12-01 20:47 ` Dave Page <dpage@vale-housing.co.uk>
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