ZMemTable and array fields bug

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
stoffman
Senior Boarder
Senior Boarder
Posts: 50
Joined: 03.12.2020, 06:55

ZMemTable and array fields bug

Post by stoffman »

Hi,

A query I work on has an array field in a results set. After copying it to ZMemTable the gird I'm using to present the data returns with the following error:
"EZSQLException: Cannot access blob record in column 4 with type String". This error doesn't happen when I'm presenting the data directly from the original ZReadOnlyQuery. (I used the ZMemTable1.CloneDataFrom(ZReadOnlyQuery1) to copy the data)

(I'm using PostgreSQL)

I think this bug has the same roots as previous post I made regarding array columns. But maybe it is something specific to ZMemTable.

Is there away to clone the data exactly as is?

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

Re: ZMemTable and array fields bug

Post by marsupilami »

stoffman wrote: 24.04.2022, 09:18 A query I work on has an array field in a results set. After copying it to ZMemTable the gird I'm using to present the data returns with the following error:
"EZSQLException: Cannot access blob record in column 4 with type String". This error doesn't happen when I'm presenting the data directly from the original ZReadOnlyQuery. (I used the ZMemTable1.CloneDataFrom(ZReadOnlyQuery1) to copy the data)

(I'm using PostgreSQL)

I think this bug has the same roots as previous post I made regarding array columns. But maybe it is something specific to ZMemTable.
This bug most probably has the same roots. When using TZReadOnlyQuery, Zeos internally will use TZPostgreSQLResultSet which operates on the PostgreSQL API directly. TZMemTable.CloneDataFrom will try to copy the data into a TZCachedResultSet - which in turn will trigger the error.
stoffman wrote: 24.04.2022, 09:18 Is there away to clone the data exactly as is?
Not in this combination since it requires to copy the data from libpq representation into Zeos internal representation.
stoffman
Senior Boarder
Senior Boarder
Posts: 50
Joined: 03.12.2020, 06:55

Re: ZMemTable and array fields bug

Post by stoffman »

I'm not sure that the case. CloneDataFrom doesn't trigger the error. Only when I present ZMemTable in the grid. So the cloning part works fine.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: ZMemTable and array fields bug

Post by marsupilami »

As mentioned here: Could you please check if BinaryWireResultMode=False enabley you to work with array fields the way you want to work with them?
Post Reply