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 041319DCC18 for ; Fri, 9 Dec 2005 10:04:24 -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 96728-01 for ; Fri, 9 Dec 2005 10:04:28 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp.pzkagis.cz (gis6.netbox.cz [83.240.30.214]) by postgresql.org (Postfix) with ESMTP id C4C969DCABA for ; Fri, 9 Dec 2005 10:04:18 -0400 (AST) Received: (from luf@localhost) by smtp.pzkagis.cz (8.11.6/8.11.6) id jB9E4If13189; Fri, 9 Dec 2005 15:04:18 +0100 Date: Fri, 9 Dec 2005 15:04:18 +0100 From: Ludek Finstrle To: Dave Page Cc: pgsql-odbc@postgresql.org Subject: Re: SQLTables don't stop Message-ID: <20051209140418.GA13154@soptik.pzkagis.cz> References: <20051209114058.GA12145@soptik.pzkagis.cz> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: <20051209114058.GA12145@soptik.pzkagis.cz> User-Agent: Mutt/1.4i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/116 X-Sequence-Number: 6595 --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > > > I didn't fix something similar. I don't remember it at least. Could > > > you be more specific? I only point at Prepare, Execute, Execute or > > > ExecDirect, ExecDirect problem. > > > > There was a fix for SQLTables where Declare/Fetch messed things up for > > Borland SQL Explorer/BDE by duplicating rows. > > Yes. I didn't think it's problem. But maybe it is. I rollbacked the patch and problem is still here. I locate it and fix. Patch attached. There is problem in mixing different STMTs :-( Luf --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="psqlodbc-fetchcursor.diff" diff -c psqlodbc.orig\statement.c psqlodbc\statement.c *** psqlodbc.orig\statement.c Wed Nov 30 13:44:37 2005 --- psqlodbc\statement.c Fri Dec 09 15:55:58 2005 *************** *** 242,250 **** --- 242,252 ---- { StatementClass *rv; + mylog("SC_Constructor: entering ...\n"); rv = (StatementClass *) malloc(sizeof(StatementClass)); if (rv) { + mylog("SC_Constructor: created stmt = %u\n",rv); rv->hdbc = NULL; /* no connection associated yet */ rv->phstmt = NULL; rv->result = NULL; *************** *** 974,979 **** --- 976,982 ---- if ((((self->currTuple + 1) % ci->drivers.fetch_max) >= QR_get_num_total_tuples(res)) && QR_get_num_total_tuples(res) < ci->drivers.fetch_max) { + SC_no_fetchcursor(self); self->currTuple = QR_get_num_total_tuples(res); return SQL_NO_DATA_FOUND; } --PEIAKu/WMn1b1Hv9--