LinkedServer.EnumColumns 方法 (String, String, String, String)
Enumerates a list of columns that can be accessed on the linked server for a specified column.
命名空間: Microsoft.SqlServer.Management.Smo
組件: Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)
語法
'宣告
Public Function EnumColumns ( _
tableName As String, _
schemaName As String, _
databaseName As String, _
columnName As String _
) As DataTable
'用途
Dim instance As LinkedServer
Dim tableName As String
Dim schemaName As String
Dim databaseName As String
Dim columnName As String
Dim returnValue As DataTable
returnValue = instance.EnumColumns(tableName, _
schemaName, databaseName, columnName)
public DataTable EnumColumns(
string tableName,
string schemaName,
string databaseName,
string columnName
)
public:
DataTable^ EnumColumns(
String^ tableName,
String^ schemaName,
String^ databaseName,
String^ columnName
)
member EnumColumns :
tableName:string *
schemaName:string *
databaseName:string *
columnName:string -> DataTable
public function EnumColumns(
tableName : String,
schemaName : String,
databaseName : String,
columnName : String
) : DataTable
參數
- tableName
型別:System.String
A String value that specifies the name of the table.
- schemaName
型別:System.String
A String value that specifies the name of the schema
- databaseName
型別:System.String
A String value that specifies the name of the database.
- columnName
型別:System.String
A String value that specifies the name of the column.
傳回值
型別:System.Data.DataTable
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 |
The number of significant digits in the column. The return value for the PRECISION column is in base 10. |
|
BUFFER_LENGTH |
The transfer size of the data to and from the column. |
|
DECIMAL_DIGITS |
The number of digits to the right of the decimal point. |
|
NUM_PREC_RADIX |
The base for numeric data types. |
|
NULLABLE |
The nullability of the column. 1 = NULL is possible. 0 = NOT NULL. |
|
REMARKS |
This field always returns NULL. |
|
COLUMN_DEF |
The default value of the column. |
|
SQL_DATA_TYPE |
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 ISO interval data types. This column always returns a value. |
|
SQL_DATETIMEE_SUB |
The subtype code for DateTime and ISO interval data types. For other data types, this column returns NULL. |
|
CHAR_OCTET_LENGTH |
The maximum length in bytes of a character or integer data type column. For all other data types, this column returns NULL. |
|
ORDINAL_POSITION |
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 |
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 |
The ordinal position of the column in the table. The first column in the table is 1. This column always returns a value. |
範例
請參閱
參考
Microsoft.SqlServer.Management.Smo 命名空間