ODBC Provider Can't retrieve blob data >32Kb

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by AlexP » Thu 25 Jul 2013 14:16

Hello,

Please specify the DB, on which you tested your application: OpenEdge or MySQL?

Brob
Posts: 44
Joined: Mon 24 Oct 2011 07:31

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by Brob » Thu 25 Jul 2013 14:37

I tested both. MySQL ODBC Driver works perfect now but OpenEdge ODBC Driver still has the same problem.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by AlexP » Thu 25 Jul 2013 15:02

Hello,

Unfortunately, we cannot fix the problem without reproducing it. For example, for PostgreSQL and MySQL this problem was fixed in different places. Therefore we cannot tell what exactly this problem is due to when working with OpenEdge. As I have wrote earlier, we need remote access to the server in order to reproduce and fix the problem.

Brob
Posts: 44
Joined: Mon 24 Oct 2011 07:31

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by Brob » Tue 30 Jul 2013 14:10

Hi
I am setting up a vpn connection and test database for you and will email the connection details when ready.

I have some more information for you regarding Blob fields in Progress OpenEdge database which may help you.

When you create a blob field you have to specify the size in bytes which can be any size you choose.
For example when using CRATE TABLE
MyBlobField BLOB(33554432) , -- 32Mb
MyBlobField BLOB(1073741823) , -- 1gb (less 1 byte) max
MyBlobField BLOB(536870912) , -- half Gb
MyBlobField BLOB(16777216) , -- 16Mb

When I created the blob field 32Mb in size and then I can only retrieve 32Kb of data.
If I create the blob field at the exact a size of (1Gb -1 byte) then I can retrieve up to 64Kb.

I tried many different sizes when testing, some sizes give this error when trying to access the blob data.
Assertion Failure D:\Projects\Delphi\Dac\Common\Source\MemData.pas Line 8811

Hope this helps!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by AlexP » Wed 31 Jul 2013 10:48

Hello,

I have a DataDirect 7.1 OpenEdge Wire Protocol driver installed. Please provide the information required for connection to your server.

Brob
Posts: 44
Joined: Mon 24 Oct 2011 07:31

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by Brob » Wed 31 Jul 2013 13:04

Hi

Did some more testing with the program you sent to me which you compiled with the fixes and this is what I found.

Originally I was creating the Blob field at 32mb which did not work. I can create the blob field at almost any size up to 15.75Mb all works OK.
If I make it bigger I have to increase the size in multiples of 15.75Mb e.g.
31.5, 47.25 , 63, 78.75, 94.5 ...... up to 992.25Mb (15.75x63). These also all seem to work ok. So 32Mb did not work because it did not divide by 15.75? I have no idea why!

If you want to look into this further for your own interest I will send connection details but I'm happy to work with this and the fix you already made!

When do you think will the fix be released?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by AlexP » Wed 31 Jul 2013 13:32

Hello,

Please provide the connection data for your server in order for us to be able to finally understand this behaviour.
The new version release is planned for September

Brob
Posts: 44
Joined: Mon 24 Oct 2011 07:31

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by Brob » Thu 01 Aug 2013 06:50

Connection details sent and vpn now enabled.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by AlexP » Thu 01 Aug 2013 13:48

Hello,

We have reproduced the problem and will fix it shortly. Please don't close the VPN connection until we fix the problem.

Brob
Posts: 44
Joined: Mon 24 Oct 2011 07:31

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by Brob » Thu 01 Aug 2013 14:06

OK I will leave it open until you tell me you have finished

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by AlexP » Fri 02 Aug 2013 08:30

Hello,

We have fixed the problem, I have rebuilt your application and sent it to you. Please check the fix and let us know the result.

Brob
Posts: 44
Joined: Mon 24 Oct 2011 07:31

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by Brob » Fri 02 Aug 2013 09:03

Test results.

The tables with blob fields created <= 15.75Mb - Now all work ok, any size.

Blob fields created > 15.75Mb in multiples of 15.75Mb all work ok.

Blob fields created > 15.75Mb when the size not in multiples of 15.75Mb only return the first 31995 bytes of data (test tables ending in _16MB, _32MB, _640MB, _1GB). These returned 0 bytes with the previous test application.

Brob
Posts: 44
Joined: Mon 24 Oct 2011 07:31

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by Brob » Thu 08 Aug 2013 06:38

Hi Alex
Are you still working on this?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by AlexP » Thu 08 Aug 2013 10:10

Hello,

We have fixed the problem. From now, such fields will be mapped as BLOB by default - data and size are retrieved correctly.

Brob
Posts: 44
Joined: Mon 24 Oct 2011 07:31

Re: ODBC Provider Can't retrieve blob data >32Kb

Post by Brob » Thu 08 Aug 2013 10:20

Hi Alex

That's excellent news! Do you want me to test again?

I know you spent a lot of time on this, so many thanks for all your hard work. Another good reason to buy all your data access components from Devart!

Post Reply