X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 527029DCAB4 for ; Thu, 1 Dec 2005 16:47:23 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80425-01 for ; Thu, 1 Dec 2005 16:47:19 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by postgresql.org (Postfix) with ESMTP id 34B939DD6BA for ; Thu, 1 Dec 2005 16:47:20 -0400 (AST) Received: from mailgate.vale-housing.co.uk ([194.217.48.34] helo=vale-housing.co.uk) by anchor-post-35.mail.demon.net with esmtp (Exim 4.42) id 1EhvEI-000MjY-HA for pgsql-odbc@postgresql.org; Thu, 01 Dec 2005 20:40:34 +0000 Received: from 84.13.71.190 ([84.13.71.190]) by ratbert.vale-housing.co.uk ([192.168.1.106]) with Microsoft Exchange Server HTTP-DAV ; Thu, 1 Dec 2005 20:47:20 +0000 User-Agent: Microsoft-Entourage/11.2.1.051004 Date: Thu, 01 Dec 2005 20:47:20 +0000 Subject: Re: Annoying problem with UseDeclareFetch From: Dave Page To: Ludek Finstrle , Thomas Chabaud CC: Message-ID: Thread-Topic: [ODBC] Annoying problem with UseDeclareFetch Thread-Index: AcX2uGw4qn+q/mKrEdqgEwARJHpWaA== In-Reply-To: <20051201200931.GB16735@soptik.pzkagis.cz> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.253 required=5 tests=[RCVD_NUMERIC_HELO=1.253] X-Spam-Score: 1.253 X-Spam-Level: * X-Archive-Number: 200512/8 X-Sequence-Number: 6487 On 1/12/05 8:09 pm, "Ludek Finstrle" 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