Android problem with version 9 and PostgreSQL

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
evgeniym
Devart Team
Posts: 103
Joined: Thu 13 May 2021 07:08

Re: Android problem with version 9 and PostgreSQL

Post by evgeniym » Tue 12 Oct 2021 12:43

Hi Sergio!
Thank you for your reply.
Be informed that we were able to reproduce the error using your sample and investigated it.
In the example provided, when using the Insert query, the IDE cannot automatically determine the type of the Value parameter when assigned. This results in a data conversion error.
Please note that when working with Blob fields, it is recommended to use Assign.

For example:

Code: Select all

qryPg.ParamByName ('immagine'). Assign (tblTemp.FieldByName ('immagine')); 
For more details, please see this link:
https://www.devart.com/unidac/docs/deva ... tblob).htm

You can also specify the explicitly type of the parameter when assigning:

Code: Select all

qryPg.ParamByName ('immagine').AsBlob: = tblTemp.FieldByName ('immagine'). Value; 
Or if you want to use the assignment via Value, then you need to explicitly specify the data type of the parameter before the assignment:

Code: Select all

qryPg.ParamByName ('immagine').DataType: = ftBlob; 
qryPg.ParamByName ('immagine').Value: = tblTemp.FieldByName ('immagine'). Value; 
Should you have any questions, do not hesitate to ask!
Regards,
Evgeniy

badmood
Posts: 37
Joined: Thu 29 Jan 2009 23:28
Location: Italy

Re: Android problem with version 9 and PostgreSQL

Post by badmood » Tue 12 Oct 2021 16:22

Hi Evgeniy,

thanks again for the answers, it was the only place with that kind of blob assignment.
The strange thing is that this was working without errors on previous version.

But it's good to know it's resolved!

Regards.

Sergio

evgeniym
Devart Team
Posts: 103
Joined: Thu 13 May 2021 07:08

Re: Android problem with version 9 and PostgreSQL

Post by evgeniym » Wed 13 Oct 2021 08:41

Hi Sergio!
Thank you for your reply and for choosing our products! Do not hesitate to ask if you have any other questions. Have a nice day.
Regards,
Evgeniy

Post Reply