Page 1 of 2
doCachedLobs = True, but List index out of bounds (3)
Posted: 22.02.2016, 18:55
by louis
Hallo,
I have a TReadOnlyQuery with a doCachedLobs = True option.
When I try to do a ReadOnlyQuery.Refresh I get this exception: index out of bounds (3) on line 2366 in ZDbcCachedResultSet.pas file.
This exception results only if a record has a Blob field not null. If blob filed is null the exception is not raised.
I Compiled with Delphi 2010 + FB 2.5.5 and Zeos 7.2.0.3806.
What I'm wrong?
Thanks
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 22.02.2016, 19:17
by miab3
@louis,
And how is in version 7.2.1-rc ie svn 3873?
Michal
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 22.02.2016, 19:18
by louis
Verified with latest 3877 revision but is the same
![Sad :(](./images/smilies/icon_sad.gif)
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 22.02.2016, 20:58
by miab3
@louis,
Really.
There is a problem with the start of the application with the option doCachedLobs = True and full BLOB in first record.
However, if after the start (in runtime) Enable this option it work without error.
Michal
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 23.02.2016, 06:06
by EgonHugeist
Hi louis,
thanks for pointing this issue out. Patch done R3878 \testing-7.2 (SVN)
note if you set this option zeos always loads the lobs for FB/PostgreSQL+OID-Lobs. If you do not use this option, Zeos just loads the lobs on demand.
Regards, Michael
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 23.02.2016, 08:56
by louis
EgonHugeist wrote:thanks for pointing this issue out. Patch done R3878 \testing-7.2 (SVN)
Not, I download Revision 3878 with TortoiseSVN.
TortoiseSVN updates revision from 3877 to 3878 but not shows which files was updated.
Clean, Build and reinstall Zeos package do not solves exception
Thanks.
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 23.02.2016, 09:11
by louis
miab3 wrote:
There is a problem with the start of the application with the option doCachedLobs = True and full BLOB in first record.
However, if after the start (in runtime) Enable this option it work without error.
I Confirm, if I set doCachedLobs runtime it works, even in 3878 revision.
Thanks
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 23.02.2016, 09:57
by EgonHugeist
Now you make me curious..
My patch should also work @design-time.. There was a EIndexOutOfBounds on accessing column-inforomations from a TObjectList if this option was set. So this is fixed now and i've added a huge test for all drivers to have a behavior control in future.
Maybe i missunderstand you. From what my tests do achieve with/without the option it should work properly now. Confirmed?
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 23.02.2016, 10:32
by louis
EgonHugeist wrote:the option it should work properly now. Confirmed?
Sorry but not, even il 3879 revision
I have this scenario:
1) a table (items) with more fields, one of them is a binary blob (image). this table is a foreighkey for another table (orders).
2) during populate "Orders" table by visual components, I need to see the image of the "Item" that I have editing in "Orders".
3) The image showed during editing of items in Orders is made with a TDBImage linked to a zReadOnlyQuery that have this sql code: "Select Image from Items where ID = :Item_ID"
4) during editing item row in "Orders" table i need to do a zReadOnlyQuery.Refresh in OnChanged of Item field of "Orders" table to link with ":Item_ID" parameter but Exception are made by line 2366 of code in ZDbcCachedResultSet.pas file (Delphi debugger stops here).
If i set doCachedLobs run-time I don't have exception.
Thanks
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 23.02.2016, 10:50
by EgonHugeist
But than the issue is somewhere else and is unrelated to this option.
So it might be possible you're tracking a second issue. Louis could you make a little template app with a create-script or a ready database? Else i can't locate your problem..
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 23.02.2016, 11:06
by miab3
@louis,
TortoiseSVN allows you to track changes.
Changes also see eg. here:
https://sourceforge.net/p/zeoslib/code-0/commit_browser
Michal
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 23.02.2016, 16:58
by louis
EgonHugeist wrote:Louis could you make a little template app with a create-script or a ready database? Else i can't locate your problem..
Ok, see attacked file.
Compile file, then click Button and obtain exception.
Thanks
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 23.02.2016, 20:14
by miab3
@louis,
After throwing "mx-inventions" for me everything works without errors.
Can you give an example with error using the basic (standard) components?
Michal
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 24.02.2016, 03:56
by EgonHugeist
miab3 wrote:@louis,
After throwing "mx-inventions" for me everything works without errors.
Can you give an example with error using the basic (standard) components?
Michal
Same from my side..
Re: doCachedLobs = True, but List index out of bounds (3)
Posted: 24.02.2016, 09:48
by louis
Oops, sorry. Force of habit.
See attacked file.
Thanks