Google translator on:
I have a connection to DB2 database.
The system is trying to do an update also changing the primary key.
Couldn't execute query. [IBM][CLI Driver][DB2/NT64] SQL0438N O aplicativo apresentou erro ou aviso com texto de diagnostico: "PAF-Coluna PK nao pode ser alterada;". SQLSTATE=75000 – UPDATE dba.produto SET IDSECAO='6',IDGRUPO='1152',IDSUBGRUPO='56',DESCRCOMPRODUTO='ARROZ SEPE TP2 5KG.',IDPRODUTO='20006' WHERE IDPRODUTO IN ('20006')
The ProductID field is the primary key of the table. It should not be part of the command, only the WHERE condition.
What should I do to fix this?
Grateful for the attention.
Hello,
This is resolved in full version. We skipped PK while insertion and updation.
I saw that you bought license, so just override the lib folder and it should work.
Docs:
First field in column definition array is by-default skipped from INSERT query (assuming to be primary key and auto increment).
If you wish to include it in INSERT sql (non auto increment) you can set:
$col["autoid"] = false;