GetSchema() method of the connection
object can be used to retrieve schema information about the
database currently connected to. The schema information is
returned in the form of a
schema information is organized into a number of collections.
Different forms of the
GetSchema() method can
be used depending on the information required. There are three
forms of the
GetSchema()- This call will return a list of available collections.
GetSchema(String)- This call returns information about the collection named in the string parameter. If the string “MetaDataCollections” is used then a list of all available collections is returned. This is the same as calling
GetSchema()without any parameters.
GetSchema(String, String)- In this call the first string parameter represents the collection name, and the second parameter represents a string array of restriction values. Restriction values limit the amount of data that will be returned. Restriction values are explained in more detail in the Microsoft .NET documentation.