Deprecated Final Support - ftString Parameter mapping to nText

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
BenW
Posts: 9
Joined: Thu 14 May 2009 04:35

Deprecated Final Support - ftString Parameter mapping to nText

Post by BenW » Tue 25 Feb 2014 21:36

Hi,

I'm currently using Delphi XE2 with dbexpsda40.dll 6.2.3.0

I have code that stores the contents of a file in an nvarchar(max) database column using an input param of type ftString.

When the file contains less than 4000 characters the generated query maps the file contents field to nvarchar(x) where x is the size of the chracter count in the file.

But when the file contains > 4000 characters (i.e. the limit for nvarchar(n)) the generated query maps the file contents field to nText.

nText currently raises a "Deprecation Final Support" message in SQL Server Profiler when you have Deprecation events enabled. I expect it should actually map to nvarchar(max) instead.

Has this been fixed in version 6.3.5?

Thanks

PavloP
Devart Team
Posts: 149
Joined: Fri 24 Jan 2014 12:33

Re: Deprecated Final Support - ftString Parameter mapping to nText

Post by PavloP » Wed 02 Apr 2014 10:39

Thank you for the information. We have reproduced this issue. We will investigate the possibility of changing this behaviour in the next dbExpress driver for SQL Server version.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: Deprecated Final Support - ftString Parameter mapping to nText

Post by Dimon » Thu 15 May 2014 15:21

We have investigated the issue. This behavior is due to OLEDB provider, and not dbExpress driver.
Since OLEDB provider is used in DbxSda by default, then the parameter is mapped to nText. If you use NativeClient provider, the field will be mapped to nvarchar(max).
To use SQL Native Client provider, you should set the TSQLConnection.VendorLib property to 'sqlncli'.

Post Reply