SetCodePage Method
Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.
The SetCodePage method alters the character set used to interpret data during a bulk copy operation.
구문
object
.SetCodePage(
INew
, [ UserCodePage ] )
Parts
- object
Expression that evaluates to an object in the Applies To list.
- INew
Long integer or constant that specifies the new code page or code page setting method as described in Settings.
- UserCodePage
Long integer that specifies a code page by number as described in Settings.
Prototype (C/C++)
HRESULT SetCodePage(SQLDMO_BCP_CODEPAGE_TYPE NewValue,
long UserCodePage = SQLDMOBCP_OEM);
Settings
Set the INew argument using these values. If setting INew to SQLDMOBCP_User, set UserCodePage using these values.
Constant | Value | Description |
---|---|---|
SQLDMOBCP_RAW |
-1 |
Use the installed server code page. |
SQLDMOBCP_ACP |
0 |
Use the Microsoft Windows default, code page 1252 (ISO 8859-1). |
SQLDMOBCP_OEM |
1 |
Use the code page installed on the client. Default value for method. For default behavior for bulk copy operations performed using SQL Distributed Management Objects (SQL-DMO), see Remarks. |
SQLDMOBCP_User |
2 |
Use the caller-specified code page. Indicate the code page by number using the UserCodePage argument. |
주의
A character set (code page) is used to interpret multibyte character data, determining character value, and therefore sort order. Code page settings apply only to multibyte character data, not to Unicode character data. A code page is chosen for an instance of SQL Server during setup.
By default, a bulk copy operation interprets character data assuming the code page used by an instance of SQL Server that is either the source or the destination for the copied data. This default behavior can be changed using the SetCodePage method.