The batch makes the calls to add error strings to the SQL Server master.sys.messages table, as in the following example:
@msgtext = 'Error inserting records into the conference table.',
@severity = 11,
@msgnum = 70001,
@lang = US_ENGLISH,
@replace = REPLACE
In this example, the batch assigns a language type that is defined by using all uppercase letters to the sp_addmessage @lang parameter. The sp_addmessage system-stored procedure then checks the assigned value of the @lang parameter, as in the following:
When an instance of the SQL Server collation is binary or case-sensitive (CS), the master.sys.sylanquages table name column stores us_english in lowercase. If the assigned value of @lang is in uppercase, as in @lang = US_ENGLISH, the @lang parameter does not represent a value that includes the value of us_english in lowercase.
Note The text string for the SQL Server error 15033 is as follows:
Note By default, an instance of SQL Server that is installed on a computer that is using English (United States) as the Windows system locale installs the SQL_Latin1_General_CP1_CI_AS case-insensitive (CI) sort order, unless a different sort order is specified during the installation.
For information about the available SQL Server collations, see the ”More information” section.
For more information about collation settings in Setup, visit the following Microsoft webpage:
ID Bài viết: 2445525 - Xem lại Lần cuối: 17-11-2010 - Bản sửa đổi: 1