TMemofield in XE4
TMemofield in XE4
Good day.
I wonder why, using the drive in PostgreSQL in Delphi XE4, the following select returns a Memo:
"SELECT COALESCE('AVC', '') FROM PG_DATABASE"
or with cast:
"SELECT CAST(COALESCE(CAST('AVC' AS VARCHAR(30)), '') AS VARCHAR(30)) FROM PG_DATABASE"
Recalling that in Firebird, the return is a String.
Have any way to return a String in PostgreSQL?
Thanks.
I wonder why, using the drive in PostgreSQL in Delphi XE4, the following select returns a Memo:
"SELECT COALESCE('AVC', '') FROM PG_DATABASE"
or with cast:
"SELECT CAST(COALESCE(CAST('AVC' AS VARCHAR(30)), '') AS VARCHAR(30)) FROM PG_DATABASE"
Recalling that in Firebird, the return is a String.
Have any way to return a String in PostgreSQL?
Thanks.
Re: TMemofield in XE4
Hello,
We cannot reproduce the problem on XE4 and the latest driver version 3.3.4. When explicitly mapping fields with the CAST method, the fields are mapped as TWideString. If you are using the previous versions of the driver, please try reproducing the problem on the latest driver version - if the problem repeats, please send a small sample reproducing the problem, and also specify the exact version of the PostgreSQL server.
We cannot reproduce the problem on XE4 and the latest driver version 3.3.4. When explicitly mapping fields with the CAST method, the fields are mapped as TWideString. If you are using the previous versions of the driver, please try reproducing the problem on the latest driver version - if the problem repeats, please send a small sample reproducing the problem, and also specify the exact version of the PostgreSQL server.
Re: TMemofield in XE4
Hello.
I updated the driver but still the problem occurs. The PostgreSQL version is 8.2.4.
Below link to download the sample project:
http://www.4shared.com/rar/HgKzzAaO/Teste_PGS.html
I tested version 9.2 and it works correctly, but it is necessary to work in version 8.2.4 because there is no possibility to migrate.
Thanks...
I updated the driver but still the problem occurs. The PostgreSQL version is 8.2.4.
Below link to download the sample project:
http://www.4shared.com/rar/HgKzzAaO/Teste_PGS.html
I tested version 9.2 and it works correctly, but it is necessary to work in version 8.2.4 because there is no possibility to migrate.
Thanks...
-
- Posts: 9
- Joined: Wed 12 Dec 2012 19:36
Re: TMemofield in XE4
I have the same problem!
Do we have any solution?
Do we have any solution?
Re: TMemofield in XE4
Hello,
Such behaviour is due to that server doesn't send such field size, and if a string field ha no size, we map it to a Memo field. To solve the problem, you should enable the UnknownAsString option.
Such behaviour is due to that server doesn't send such field size, and if a string field ha no size, we map it to a Memo field. To solve the problem, you should enable the UnknownAsString option.
-
- Posts: 9
- Joined: Wed 12 Dec 2012 19:36
Re: TMemofield in XE4
Thank!
This parameter solved my problem.
This parameter solved my problem.
Re: TMemofield in XE4
Hello,
Glad to see that the problem was solved. If you have any other questions, feel free to contact us.
Glad to see that the problem was solved. If you have any other questions, feel free to contact us.