Procedure parametr with null character

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 2
Joined: Fri 18 Jan 2013 07:33

Procedure parametr with null character

Post by keiichi » Fri 26 Apr 2013 07:21


SQL Server permits for null character (ASCII 0) embedded in VARCHAR or NVARCHAR data. Also Delphi allows for #0 character in string.
However TMSStoredProc component incorectly passes such parameters to database if parameter type is NVARCHAR(any size) or VARCHAR(MAX). The value is trimmed on first null character. Procedures with VARCHAR parameter with size other than MAX work correctly.

I think there is problem in calculating size of data in bytes when procedure expect WideString parameter.

I use SDAC v.6.6.12, Delphi XE2 Update 4 HotFix 1 and SQL Server 2008 R2.


Re: Procedure parametr with null character

Post by AndreyZ » Mon 29 Apr 2013 10:19


Thank you for the information. We have fixed this problem. This fix will be included in the next SDAC build.

Post Reply