다음을 통해 공유


LinkedServer.EnumColumns Method (String, String, String)

Enumerates a list of columns that can be accessed on the linked server for a specified table, schema, and database.

네임스페이스: Microsoft.SqlServer.Management.Smo
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

구문

‘선언
Public Function EnumColumns ( _
    tableName As String, _
    schemaName As String, _
    databaseName As String _
) As DataTable
public DataTable EnumColumns (
    string tableName,
    string schemaName,
    string databaseName
)
public:
DataTable^ EnumColumns (
    String^ tableName, 
    String^ schemaName, 
    String^ databaseName
)
public DataTable EnumColumns (
    String tableName, 
    String schemaName, 
    String databaseName
)
public function EnumColumns (
    tableName : String, 
    schemaName : String, 
    databaseName : String
) : DataTable

매개 변수

  • tableName
    A String value that specifies the name of the table.
  • schemaName
    A String value that specifies the name of the schema.
  • databaseName
    A String value that specifies the name of the database.

반환 값

A DataTable object value that contains a list of tables that can be accessed on the linked server. The table describes the different columns of the returned DataTable.

Column

Data type

Description

COLUMN_SIZE

Int32

The number of significant digits in the column. The return value for the PRECISION column is in base 10.

BUFFER_LENGTH

Int32

The transfer size of the data to and from the column.

DECIMAL_DIGITS

Int32

The number of digits to the right of the decimal point.

NUM_PREC_RADIX

Int32

The base for numeric data types.

NULLABLE

Int32

The nullability of the column.

1 = NULL is possible.

0 = NOT NULL.

REMARKS

String

This field always returns NULL.

COLUMN_DEF

String

The default value of the column.

SQL_DATA_TYPE

Int32

The value of the SQL data type as it appears in the TYPE field of the descriptor. This column is the same as the DATA_TYPE column, except for the DateTime and SQL-92 interval data types. This column always returns a value.

SQL_DATETIMEE_SUB

Int32

The subtype code for DateTime and SQL-92 interval data types. For other data types, this column returns NULL.

CHAR_OCTET_LENGTH

Int32

The maximum length in bytes of a character or integer data type column. For all other data types, this column returns NULL.

ORDINAL_POSITION

Int32

The ordinal position of the column in the table. The first column in the table is 1. This column always returns a value.

IS_NULLABLE

String

The nullability of the column in the table. ISO rules are followed to determine nullability. An ISO SQL-compliant DBMS cannot return an empty string.

YES = Column can include NULLS.

NO = Column cannot include NULLS.

This column returns a zero-length string if nullability is unknown.

The value returned for this column is different from the value returned for the NULLABLE column.

SS_DATA_TYPE

Int32

The ordinal position of the column in the table. The first column in the table is 1. This column always returns a value.

주의

이 네임스페이스, 클래스 또는 멤버는 Microsoft .NET Framework 2.0 버전에서만 지원됩니다.

How to: Link to an OLE-DB Provider Server in Visual Basic .NET

스레드 보안

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

LinkedServer Class
LinkedServer Members
Microsoft.SqlServer.Management.Smo Namespace

관련 자료

Using Linked Servers in SMO
서버 연결
sp_addlinkedserver(Transact-SQL)
sp_columns_ex(Transact-SQL)