Re: PGAPI_SetPos

From: tomas(at)nocrew(dot)org (Tomas =?iso-8859-1?q?Sk=E4re?=)
To: Peter Eltgroth <peter(at)accutelligence(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: PGAPI_SetPos
Date: 2003-11-14 18:55:45
Message-ID: 80ptfuvky6.fsf@junk.nocrew.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Peter Eltgroth <peter(at)accutelligence(dot)com> 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

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Shachar Shemesh 2003-11-15 17:55:51 Extreme slowness
Previous Message Peter Eltgroth 2003-11-14 18:19:49 PGAPI_SetPos