Blob fields in TVirtualTable (in iOS)

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Samuel
Posts: 23
Joined: Fri 11 Feb 2011 12:36
Location: Brazil

Blob fields in TVirtualTable (in iOS)

Post by Samuel » Thu 14 Jun 2018 18:42

I've developed an application for the iPad/iPhone that connects to a PostgreSQL database and displays multiple fields in a dbGrid.

For this I used the Unidac drivers and the application is working perfectly, correctly displaying the images, texts and getting some binary files from the database.

After the application was ready (and working correctly) I decided to create a version that gets the data from TStreams and for that I used several TVirtualTables.

After I finished, I realized that the images no longer displayed correctly in the dbGrid (they go blank). The binary files also are not read correctly but these issues only occur on iOS.

The same source code compiled for W32, W64, and MacOS works perfectly.

Can someone help me figure out where the problem is?

I created a example project for you to see this problem. Note that when compiled for Windows or MacOS the image is displayed but on iOS it does not appear.

Use this link to download example project:
https://1drv.ms/u/s!Al-1RWjYXpnaj8YsTzHG6ekcN8LDuw

I´m using:
Delphi 10.2 Update 3 (25.0.29899.2631)
Patch for iOS 10.3
Unidac 7.2.7

MaximG
Devart Team
Posts: 1093
Joined: Mon 06 Jul 2015 11:34

Re: Blob fields in TVirtualTable (in iOS)

Post by MaximG » Mon 18 Jun 2018 12:27

Thank you for providing the information. We've reproduced the issue and started to investigate possible causes of the described behavior. We will let you know the results as soon as we get them.

Samuel
Posts: 23
Joined: Fri 11 Feb 2011 12:36
Location: Brazil

Re: Blob fields in TVirtualTable (in iOS)

Post by Samuel » Mon 18 Jun 2018 12:50

I do not know if this information will be useful, but, to fix this problem in iOS I did the following:

1) I stored the images and binary files in a Resource Stream.
2) After open the table I update each BLOB fields from the Resource Stream values.

It appears that binary fields are not read correctly only when they are stored in the TVitualTable component or when they are read using the LoadFromStream or LoadFromFile functions.

MaximG
Devart Team
Posts: 1093
Joined: Mon 06 Jul 2015 11:34

Re: Blob fields in TVirtualTable (in iOS)

Post by MaximG » Wed 20 Jun 2018 08:57

We reproduced the issue and fixed this error. The fix will be included in the next UniDAC build. As a workaround, we can send you a night UniDAC build including the required changes. For this, using e-support form (https://www.devart.com/company/contactform.html) provide us with your license number

Samuel
Posts: 23
Joined: Fri 11 Feb 2011 12:36
Location: Brazil

Re: Blob fields in TVirtualTable (in iOS)

Post by Samuel » Wed 20 Jun 2018 11:20

Thank you.

MaximG
Devart Team
Posts: 1093
Joined: Mon 06 Jul 2015 11:34

Re: Blob fields in TVirtualTable (in iOS)

Post by MaximG » Thu 21 Jun 2018 14:54

We are glad to see the problem resolved. Please don't hesitate to contact us with questions concerning UniDAC usage.

Post Reply