Why is TWideMemoField?

Why is TWideMemoField?

Postby 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.
Eden0928
 
Posts: 44
Joined: Sun 22 Apr 2012 14:08

Re: Why is TWideMemoField?

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

Re: Why is TWideMemoField?

Postby Eden0928 » Thu 02 Jan 2014 09:34

Have other adverse effects it?

AlexP wrote:
Code: Select all
SQLConnection.Params.Values['UnknownAsString '] := 'True';
Eden0928
 
Posts: 44
Joined: Sun 22 Apr 2012 14:08

Re: Why is TWideMemoField?

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


Return to dbExpress driver for PostgreSQL