Skip site navigation (1) Skip section navigation (2)

Re: ERROR with "Update ... where Current of"

From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: BGoebel <b(dot)goebel(at)prisma-computer(dot)de>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: ERROR with "Update ... where Current of"
Date: 2011-06-19 09:49:35
Message-ID: 4DFDC62F.7050409@tpf.co.jp (view raw or flat)
Thread:
Lists: pgsql-odbc
Hi,

Unfortunately the psqlodbc driver doesn't support POSITIONED UPDATE.

regards,
Hiroshi Inoue

(2011/06/18 0:51), BGoebel wrote:
> Hi,
>
> after a lot of studying i couldn't find out what's going wrong with my
> positioned update. Whatever i have tried: SQLGetDiagRec reports: Error:
> "Cursor C1 does not exists"
>
> Here is my Code (a simplified example from MS):
> ...
> SQLRETURN = SQLAllocHandle(SQL_HANDLE_STMT, hdbc,&hstmtSelect);
> SQLRETURN = SQLAllocHandle(SQL_HANDLE_STMT, hdbc,&hstmtUpdate);
> SQLRETURN = SQLSetCursorName(hstmtSelect, "C1", SQL_NTS);
>
> SQLRETURN = SQLExecDirect(hstmtSelect,
>        "SELECT NAME, PHONE FROM CUSTOMERS",SQL_NTS);
> /* in the example, a SQLBindCol followed here ... */
> SQLRETURN = SQLFetch(hstmtSelect);
> /* positioned update : set first customers phonenumber to empty */
> SQLRETURN = SQLExecDirect(hstmtUpdate,
>     "UPDATE EMPLOYEE SET PHONE=\"\" WHERE CURRENT OF C1",SQL_NTS);
>
> ...SQLRETURN is set to -1, SQLGetDiagRec reports Error: "Cursor>>C1<<  does
> not exist"
> ...
> psqlodbc30a.dll ist directly linked.
>
> Here is what i have tried:
> - Reading, exploring, reading, ...
> - Select ... for Update
> - connection Parameter UpdatableCursors=1;
> - connection Parameter Autocommit off
> - connection Parameter UseDeclareFetch=1
> - Select ... for Update
> - Select ... with hold
> - older odbc Driver 8.04
> - explict BEGIN
>
>
> Any help would be greatly appreciated!
>
>
>
>
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/ERROR-with-Update-where-Current-of-tp4499184p4499184.html
> Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.

In response to

Responses

pgsql-odbc by date

Next:From: Hiroshi InoueDate: 2011-06-19 11:52:28
Subject: Re: ODBC Performance slow for large results
Previous:From: Ramesh ReddyDate: 2011-06-19 02:06:16
Subject: ODBC Performance slow for large results

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group