Why is TWideMemoField?

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for PostgreSQL in Delphi and C++Builder
Post Reply
Eden0928
Posts: 62
Joined: Sun 22 Apr 2012 14:08

Why is TWideMemoField?

Post by Eden0928 » Thu 02 Jan 2014 07:52

My Code:

Code: Select all

SELECT 'ABC ' || 'DEF' AS TEST
I get the "TEST" is TWideMemoField.
But, when get TWideStringField in MS SQL Server.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Why is TWideMemoField?

Post by AlexP » Thu 02 Jan 2014 08:20

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.

Code: Select all

SQLConnection.Params.Values['UnknownAsString '] := 'True';

Eden0928
Posts: 62
Joined: Sun 22 Apr 2012 14:08

Re: Why is TWideMemoField?

Post by Eden0928 » Thu 02 Jan 2014 09:34

Have other adverse effects it?
AlexP wrote:

Code: Select all

SQLConnection.Params.Values['UnknownAsString '] := 'True';

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Why is TWideMemoField?

Post by AlexP » Thu 02 Jan 2014 10:48

Hello,

If this setting is enabled, all the fields, that we cannot determine data type for, will be mapped as TStringField.

Post Reply