Page 2 of 2

Re: Android problem with version 9 and PostgreSQL

Posted: Tue 12 Oct 2021 12:43
by evgeniym
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

Re: Android problem with version 9 and PostgreSQL

Posted: Tue 12 Oct 2021 16:22
by badmood
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

Re: Android problem with version 9 and PostgreSQL

Posted: Wed 13 Oct 2021 08:41
by evgeniym
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