Re: SELECT...FOR UPDATE
Posted in 1998
Topics: SQL Development & Query Writing, Connectivity: ODBC / JDBC / .NET, Connectivity: ESQL/C, 4GL & Embedded SQL
I doubt whether you would ever be able to use a FOR UPDATE clause over
ODBC because it cannot be prepared, at least not by an Informix engine.
That clause is for 4GL only.
Also you cannot use FOR UPDATE if you have an ORDER/ GROUP BY,
expressions, aggregates or a join in the query. (Actually all makes
perfect sense if you think it through, except I don't understand why you
can't use ORDER BY.)
-Andy Kent-
Bristol, England.
In article <768l08$bf$1@nnrp1.dejanews.com>, marianat@my-dejanews.com ()
wrote:
> I'm working with an Informix OnLine Dynamic Server 7.30, and an ODBC
> driver.
> I need to know if it is possible to have a SQL query like this:
>
> select * from <table> order by <field> for update;>
> According to the messages I'm getting, this is not possible: the
> "select...for
> update" clause is rejected when you use order by or group by.
> Is this correct?
>
> Thanks,
> Mariana.
andykent@cix.co.uk (Andy Kent) writes: > I doubt whether you would ever be able to use a FOR UPDATE clause over > ODBC because it cannot be prepared, at least not by an Informix engine. I use ODBC with Informix SE and I'am able to use FOR UPDATE without problems. -- am