X-Original-To: pgsql-odbc@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id CE6EE474E4F for ; Sat, 5 Apr 2003 11:05:00 -0500 (EST) Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id 6A2A4474E42 for ; Sat, 5 Apr 2003 11:04:59 -0500 (EST) Received: (qmail 15034 invoked from network); 5 Apr 2003 16:05:03 -0000 X-Authentication: inoue was authenticated by sd.tpf.co.jp at 5 Apr 2003 16:05:03 -0000 Received: from unknown (HELO PbgX) (219.61.40.14) by sd.tpf.co.jp with SMTP; 5 Apr 2003 16:05:03 -0000 From: "Hiroshi Inoue" To: "'Dave Page'" Cc: Subject: Re: SQLSetPos Date: Sun, 6 Apr 2003 01:05:00 +0900 Message-ID: <00e901c2fb8d$1ccf8dc0$0e283ddb@PbgX> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 Importance: Normal In-Reply-To: <03AF4E498C591348A42FC93DEA9661B8259EFC@mail.vale-housing.co.uk> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Status: No, hits=-12.2 required=5.0 tests=BAYES_10,IN_REP_TO,QUOTED_EMAIL_TEXT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/16 X-Sequence-Number: 2818 > -----Original Message----- > From: Dave Page [mailto:dpage@vale-housing.co.uk] > > -----Original Message----- > > From: Hiroshi Inoue [mailto:inoue@tpf.co.jp] > > > -----Original Message----- > > > From: Dave Page [mailto:dpage@vale-housing.co.uk] > > > > > > Hi Hiroshi, > > > > > > I've had a query about support for SQLSetPos(SQL_UPDATE) in > > psqlODBC. > > > Upon examination of the code there seems to be some there > to handle > > > SQL_UPDATE, however the function exits with an error (Only > > > SQL_POSITION/REFRESH is supported for PGAPI_SetPos) before > > any of that > > > code is ever reached. > > > > > > Do you know if that's an oversight, or is the code that's > there not > > > ready for use yet? > > > > You can use SQLSetPos(SQL_UPDATE) if you compiled the driver > > with DRIVER_CURSOR_IMPLEMENT #defined(the current makefile s > > in cvs already #define it) and turn on the *Updatable > > cursors* DSN option. > > OK thanks. I'm confused by the following code towards the beginning of > PGAPI_SetPos which is not in any #ifdef block that I can see: There's else #endif /* DRIVER_CURSOR_IMPLEMENT */ just before the below code. Please pay attention to the above *else*. > if (fOption != SQL_POSITION && fOption != SQL_REFRESH) > { > SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Only > SQL_POSITION/REFRESH is supported for PGAPI_SetPos"); > SC_log_error(func, "", stmt); > return SQL_ERROR; > } > > Won't that make the function exit with an error before an > SQL_UPDATE is > handled? regards, Hiroshi Inoue