TMemofield in XE4

TMemofield in XE4

Postby jesika » Mon 02 Dec 2013 12:26

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.
jesika
 
Posts: 3
Joined: Mon 02 Dec 2013 12:14

Re: TMemofield in XE4

Postby AlexP » Tue 03 Dec 2013 11:03

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.
AlexP
Devart Team
 
Posts: 5528
Joined: Tue 10 Aug 2010 11:35

Re: TMemofield in XE4

Postby jesika » Tue 03 Dec 2013 17:44

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...
jesika
 
Posts: 3
Joined: Mon 02 Dec 2013 12:14

Re: TMemofield in XE4

Postby eurides.baptistella » Thu 05 Dec 2013 11:11

I have the same problem!
Do we have any solution?
eurides.baptistella
 
Posts: 9
Joined: Wed 12 Dec 2012 19:36

Re: TMemofield in XE4

Postby AlexP » Fri 06 Dec 2013 11:52

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.
AlexP
Devart Team
 
Posts: 5528
Joined: Tue 10 Aug 2010 11:35

Re: TMemofield in XE4

Postby eurides.baptistella » Fri 06 Dec 2013 13:35

Thank!
This parameter solved my problem.
eurides.baptistella
 
Posts: 9
Joined: Wed 12 Dec 2012 19:36

Re: TMemofield in XE4

Postby jesika » Fri 06 Dec 2013 13:40

It worked. Thank you.
jesika
 
Posts: 3
Joined: Mon 02 Dec 2013 12:14

Re: TMemofield in XE4

Postby AlexP » Mon 09 Dec 2013 07:12

Hello,

Glad to see that the problem was solved. If you have any other questions, feel free to contact us.
AlexP
Devart Team
 
Posts: 5528
Joined: Tue 10 Aug 2010 11:35


Return to dbExpress driver for PostgreSQL