Page 1 of 1

ADO + DB2

Posted: 04.05.2010, 17:36
by andrea.lai
Hi,
I use Delphi7 with zeos 6.6.6 .

I have try to use ADO protocol to interact with DB2 database.
I have try to create a new table with ZQuery and all run well.
Now I have link a ZTable component and show the record with TDataset into a DBGrid but is not possible to edit or add record into the table.
Than I have try to insert some record with this code :

ZTB1.Open;
ZTB1.Append;
ZTB1.FieldByName('ana_ean').AsString := '9999';
ZTB1.Post;

but an error occur that inform that the "ANA_EAN' Field cannot be modified.
Then I have create all Fields into the table and I have see thet all field are loaded how "readonly". Than I have remove the readonly flag but after the "Post" command occour an error that inform about that is not possible update the query.

If I try to use the "ADO" component of Delphi7 all run well. Why ??

Thanks