Re: SQLSetPos - Mailing list pgsql-odbc

From Dave Page
Subject Re: SQLSetPos
Date
Msg-id 03AF4E498C591348A42FC93DEA9661B8259EFC@mail.vale-housing.co.uk
Whole thread Raw
In response to SQLSetPos  ("Dave Page" <dpage@vale-housing.co.uk>)
Responses Re: SQLSetPos
List pgsql-odbc

> -----Original Message-----
> From: Hiroshi Inoue [mailto:inoue@tpf.co.jp]
> Sent: 03 April 2003 23:08
> To: Dave Page
> Cc: pgsql-odbc@postgresql.org
> Subject: RE: SQLSetPos
>
>
> > -----Original Message-----
> > From: Dave Page [mailto:dpage@vale-housing.co.uk]
> >
> > Hi Hiroshi,
> >
> > I've had a query about support for SQLSetPos(SQL_UPDATE) in
> psqlODBC.
> > Upon examination of the code there seems to be some there to handle
> > SQL_UPDATE, however the function exits with an error (Only
> > SQL_POSITION/REFRESH is supported for PGAPI_SetPos) before
> any of that
> > code is ever reached.
> >
> > Do you know if that's an oversight, or is the code that's there not
> > ready for use yet?
>
> You can use SQLSetPos(SQL_UPDATE) if you compiled the driver
> with DRIVER_CURSOR_IMPLEMENT #defined(the current makefile s
> in cvs already #define it) and turn on the *Updatable
> cursors* DSN option.

OK thanks. I'm confused by the following code towards the beginning of
PGAPI_SetPos which is not in any #ifdef block that I can see:

    if (fOption != SQL_POSITION && fOption != SQL_REFRESH)
    {
        SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Only
SQL_POSITION/REFRESH is supported for PGAPI_SetPos");
        SC_log_error(func, "", stmt);
        return SQL_ERROR;
    }

Won't that make the function exit with an error before an SQL_UPDATE is
handled?

Regards, Dave.


pgsql-odbc by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: Re: SQLSetPos
Next
From: "Hiroshi Inoue"
Date:
Subject: Re: SQLSetPos