Returns a DataTable that contains metadata for the data source that is associated with a DB2Connection instance.
[Visual Basic]
Public Overrides Function GetSchema As DataTable
[C#]
public override DataTable GetSchema ()
[C++]
public:
virtual DataTable^ GetSchema () override
[JScript]
public override function GetSchema () : DataTable
CollectionName | NumberOfRestrictions |
---|---|
DataSourceInformation | 0 |
TablePrivileges | 3 |
ColumnPrivileges | 4 |
Restrictions | 0 |
Columns | 4 |
ProcedureParameters | 5 |
MetaDataCollections | 0 |
Indexes | 5 |
Procedures | 4 |
DataTypes | 0 |
Catalogs | 0 |
PrimaryKeys | 3 |
Tables | 4 |
ForeignKeys | 6 |
ReservedWords | 0 |
Schemas | 0 |
[C#] The following line of C# code demonstrates how to retrieve the available metadata for the data source that is associated with a DB2Connection instance. The application can use the module name as one of the restrictions.
[C#]
DataTable table2 = conn.GetSchema();
Example of values returned by the GetSchema method
are as follows:TABLE_SCHEMA=ADMINISTRATOR
TABLE_SCHEMA=NULLID
-
-
TABLE_SCHEMA=SYSSTAT