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
ZQuery.Post without field xyz
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: ZQuery.Post without field xyz
Hello Norbert,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
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.
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: ZQuery.Post without field xyz
Another option might be to use TZUpdateSQL. There you can specify an operation to carry out on the database for each operation.
Re: ZQuery.Post without field xyz
Hello jan
Yes, that fits, if I deleted "pfInUpdate" from the ProviderFlags, the field is not taken into account in the update.
Thanks
Norbert
Yes, that fits, if I deleted "pfInUpdate" from the ProviderFlags, the field is not taken into account in the update.
Thanks
Norbert
Re: ZQuery.Post without field xyz
Alternative is to use threaded splash screen
https://stackoverflow.com/questions/388 ... 2#45465592
https://stackoverflow.com/questions/388 ... 2#45465592