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 75BDFD1B502 for ; Fri, 14 Nov 2003 18:56:34 +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 44235-04 for ; Fri, 14 Nov 2003 14:56:03 -0400 (AST) Received: from junk.nocrew.org (junk.nocrew.org [213.242.147.30]) by svr1.postgresql.org (Postfix) with ESMTP id A4475D1B518 for ; Fri, 14 Nov 2003 14:56:02 -0400 (AST) Received: from tomas by junk.nocrew.org with local (Exim 3.35 #1 (Debian)) id 1AKj6f-000121-00; Fri, 14 Nov 2003 19:55:45 +0100 To: Peter Eltgroth Cc: pgsql-odbc@postgresql.org Subject: Re: PGAPI_SetPos References: <1068833989.3fb51cc575321@accutelligence.com> From: tomas@nocrew.org (Tomas =?iso-8859-1?q?Sk=E4re?=) Date: 14 Nov 2003 19:55:45 +0100 In-Reply-To: <1068833989.3fb51cc575321@accutelligence.com> Message-ID: <80ptfuvky6.fsf@junk.nocrew.org> Lines: 35 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/84 X-Sequence-Number: 3486 Peter Eltgroth writes: > Hello, > > We are attempting to use an ETL tool (Monarch Data Pump) to move data from > various sources into PostgreSQL; however, we are recieving the following error > message when we attempt to Load the data: > > [1500][SQLSetPos][1500]PGAPI_SetPos fOption=4 irow=1 lock=0 currt=0 > [1500]STATEMENT ERROR: func=PGAPI_SetPos, desc='', errnum=10, errmsg='Only > SQL_POSITION/REFRESH is supported for PGAPI_SetPos' > [1500]CONN ERROR: func=PGAPI_SetPos, desc='', errnum=0, errmsg='(NULL)' > [1500][[SQLGetDiagRec]] > > We tried several recent ODBC drivers (versions 7.03.02.03, 7.03.02, and > 7.03.01), and made sure to check "Updateable Cursors". I think you have to set the concurrency attribute to ROWVER on the statement, before you can use others than POSITION and REFRESH with SetPos. You do this with this call: SQLSetStmtAttr(hstmt, SQL_ATTR_CONCURRENCY, (SQLPOINTER)SQL_CONCUR_ROWVER, 0); Maybe you also need to set the cursor type to keyset driven. I do that at least. SQLSetStmtAttr(hstmt, SQL_ATTR_CURSOR_TYPE, (SQLPOINTER)SQL_CURSOR_KEYSET_DRIVEN, 0); Good luck, Tomas