Calling FormatMessage  
Author Message

PostPosted: Top

SQL Server >> Calling FormatMessage


I need to get a string of the error 547 in SQL. I tried calling
select FormatMessage(547, 'UPDATE', 'T1', 'XYZ', 'C1') from query analyzer.
It gives an output if I give only 4 parameters (till 'XYZ'). It gives a blank
output when I give the 5th parameter. Where ever %.*ls is passed, in the
following error description from sysmessages, my select statement fetches

%ls statement conflicted with %ls %ls constraint '%.*ls'. The conflict
occurred in database '%.*ls', table '%.*ls'%ls%.*ls%ls.

Can someone please tell if there is any error in the Syntax.
Thanks and Regards,

SQL Server19