X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 7428BD1B4EF for ; Sat, 8 Nov 2003 10:51:25 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 39445-01 for ; Sat, 8 Nov 2003 06:50:56 -0400 (AST) Received: from junk.nocrew.org (junk.nocrew.org [213.242.147.30]) by svr1.postgresql.org (Postfix) with ESMTP id 50220D1B4E9 for ; Sat, 8 Nov 2003 06:50:53 -0400 (AST) Received: from tomas by junk.nocrew.org with local (Exim 3.35 #1 (Debian)) for pgsql-odbc@postgresql.org id 1AIQg5-0002nI-00; Sat, 08 Nov 2003 11:50:49 +0100 To: pgsql-odbc@postgresql.org Subject: SQLSetPos with SQL_POSITION From: tomas@nocrew.org (Tomas =?iso-8859-1?q?Sk=E4re?=) Date: 08 Nov 2003 11:50:49 +0100 Message-ID: <80he1fw2uu.fsf@junk.nocrew.org> Lines: 32 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/53 X-Sequence-Number: 3455 Hi, I have a question that might be more generally about ODBC. As I've understood it, the SQLSetPos function, when doing UPDATE/REFRESH/DELETE uses the rownumber within the currently fetched rowset, while POSITION sets the cursor on the row number on the whole result set. Or am I wrong here? Does POSITION also work only within the current rowset? With pgsql-odbc I get a "Row out of range" error when trying to do SQLSetPos with SQL_POSITION and a rownumber other than 1. The rowset size is set to 1 (one). If I have made a select, I want to make a function that will update one or several rows in this selection. Is it correct ODBC that I have to do an SQLFetchScroll first, to set the cursor on the row I want to update, and then use SQLSetPos with SQL_UPDATE to do the update? From reading MSDN ODBC API, I got the impression that I could do an SQLSetPos with SQL_POSITION, instead of the SQLFetchScroll. I've set the cursor type to keyset driven and concurrency to ROWVER, and I've compiled the psqlodbc from CVS with odbcver=0x0300. I'm pretty new to ODBC, so I'm not familiar with all kinds of cursors and such that are best for me. Any help to enlighten me is appreciated. Also, are there any more good documentation for the ODBC API than the MSDN pages? Greetings, Tomas