Re: Strange ODBC error
Posted in 2003
Topics: Connectivity: ODBC / JDBC / .NET, Versions, Editions & End-of-Life
Andreas Schlegel wrote:
> Updating a row on IDS 7.3.1 using a MS Access 2000 client I get the ODBC
> error:
> "A SERIAL column (col1) may not be updated. (#-232)"
>
> Of course I didn't tried to modify a serial value. This happens when I
> update any value in a linked table or in a form based on this table.
>
> If I use an MS Access update query the row will be updated. Also an
> insert works fine.
> If I use a table without a serial column the update makes no problem.
>
> Any idea what goes wrong?
>
> System:
> IDS 7.3.1
> MS Access 2000
> IBM Informix ODBC driver: 3.81.0000 2.80.TC1
You have a table CREATE TABLE x (a SERIAL, b CHAR(10));
Your application does:
UPDATE x SET a = <current-value-of-a>, b = <new-value-of-b>
WHERE a = <current-value-of-a>;
Informix says "Thou shalt not". Mismatch in expectations...
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
Jonathan Leffler wrote:
> Andreas Schlegel wrote:
>
> You have a table CREATE TABLE x (a SERIAL, b CHAR(10));
> Your application does:
>
> UPDATE x SET a = <current-value-of-a>, b = <new-value-of-b>
> WHERE a = <current-value-of-a>;No! I did:
UPDATE x SET b = <new-value-of-b>
WHERE a = <current-value-of-a>;
Well, this works ... if I send this statement.
But if I edit a row in a linked Informix table in MS-Access 2000 I get
the message:
"A SERIAL column (a) may not be updated. (#-232)"
Of course I didn't updated the column a! I don't know what Access is
doing in the background when I edit a row of a linked table. May be it
is a problem of the ODBC driver or of configuration.
Hope somebody has a good idea.
I just downloaded the current ODBC diver: 3.82.0000 2.81.TC1. But the is
still there.
The Access-Client runs on Win98, the Informix IDS 7.3.1 on Linux.
Greetings,
Andreas