pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PGAPI_SetPos
2+ messages / 2 participants
[nested] [flat]

* PGAPI_SetPos
@ 2003-11-14 18:19 Peter Eltgroth <peter@accutelligence.com>
  2003-11-14 18:55 ` Re: PGAPI_SetPos Tomas Skäre <tomas@nocrew.org>
  0 siblings, 1 reply; 2+ messages in thread

From: Peter Eltgroth @ 2003-11-14 18:19 UTC (permalink / raw)
  To: pgsql-odbc

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 have also reviewed the posts at
http://archives.postgresql.org/pgsql-odbc/2003-07/msg00006.php and
http://archives.postgresql.org/pgsql-odbc/2003-04/msg00015.php and downloaded
the source code. Unfortunately, I have not programmed C for about
10 years.  Are we missing something obvious?

Thanks,

Peter Eltgroth




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: PGAPI_SetPos
  2003-11-14 18:19 PGAPI_SetPos Peter Eltgroth <peter@accutelligence.com>
@ 2003-11-14 18:55 ` Tomas Skäre <tomas@nocrew.org>
  0 siblings, 0 replies; 2+ messages in thread

From: tomas@nocrew.org @ 2003-11-14 18:55 UTC (permalink / raw)
  To: Peter Eltgroth <peter@accutelligence.com>; +Cc: pgsql-odbc

Peter Eltgroth <peter@accutelligence.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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2003-11-14 18:55 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-14 18:19 PGAPI_SetPos Peter Eltgroth <peter@accutelligence.com>
2003-11-14 18:55 ` Tomas Skäre <tomas@nocrew.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox