ZQuery.Post without field xyz

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
nlanger
Junior Boarder
Junior Boarder
Posts: 27
Joined: 14.10.2020, 21:56

ZQuery.Post without field xyz

Post by nlanger »

If I fetch an SQL command from a view and it contains a field that cannot be changed (from another table), it works fine for ZQuery.Edit and ZQuery.Post. An error occurs (from MS-SQLserver) with ZQuery.Insert and ZQuery.Post because the field must not be modified with.

Can I remove the field from the set of fields to be changed?

In Zeos 6.6.6 it worked with: TZDataset(QU_).SetFieldDesc(F,True);

Norbert
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: ZQuery.Post without field xyz

Post by marsupilami »

nlanger wrote: 08.07.2022, 13:46 If I fetch an SQL command from a view and it contains a field that cannot be changed (from another table), it works fine for ZQuery.Edit and ZQuery.Post. An error occurs (from MS-SQLserver) with ZQuery.Insert and ZQuery.Post because the field must not be modified with.

Can I remove the field from the set of fields to be changed?

In Zeos 6.6.6 it worked with: TZDataset(QU_).SetFieldDesc(F,True);

Norbert
Hello Norbert,

this sounds like a bug if Zeos ignores the field for updates but doesn't ignore it for inserts. Is the field correctly marked as ReadOnly? I added some preliminary release notes. Maybe the chapter "Zeos now respects TField.ProviderFlags" will help you?

Best regards,

Jan
You do not have the required permissions to view the files attached to this post.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: ZQuery.Post without field xyz

Post by marsupilami »

Another option might be to use TZUpdateSQL. There you can specify an operation to carry out on the database for each operation.
nlanger
Junior Boarder
Junior Boarder
Posts: 27
Joined: 14.10.2020, 21:56

Re: ZQuery.Post without field xyz

Post by nlanger »

Hello jan

Yes, that fits, if I deleted "pfInUpdate" from the ProviderFlags, the field is not taken into account in the update. :D

Thanks
Norbert
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: ZQuery.Post without field xyz

Post by Fr0sT »

Alternative is to use threaded splash screen
https://stackoverflow.com/questions/388 ... 2#45465592
Post Reply