VistaDB 5






Specifies the name of the schema to return.
Values to restrict for this lookup. See MSDN docs for more help on restricting collections.
GetSchema(String,String[]) Method
Returns schema information for the data source of this VistaDBConnection using the specified string for the schema name and the specified string array for the restriction values. Examples schema that may be requested are: RESERVEDWORDS - list of words reserved for usage by the engine COLUMNS - List of columns DATATYPES - Types in usage by the current engine VIEWS - Views in the current database FOREIGNKEYS - Lists of foreign keys in database Class VistaDBConnection
Syntax
'Declaration
 
Public Overloads Overrides NotOverridable Function GetSchema( _
   ByVal collectionName As System.String, _
   ByVal restrictionValues() As System.String _
) As System.Data.DataTable
'Usage
 
Dim instance As VistaDBConnection
Dim collectionName As System.String
Dim restrictionValues() As System.String
Dim value As System.Data.DataTable
 
value = instance.GetSchema(collectionName, restrictionValues)
public override System.Data.DataTable GetSchema( 
   System.string collectionName,
   System.string[] restrictionValues
)
public function GetSchema( 
    collectionName: System.String;
    restrictionValues: System.Stringarray of
): System.Data.DataTable; override; 
public override function GetSchema( 
   collectionName : System.String,
   restrictionValues : System.String[]
) : System.Data.DataTable;
public: System.Data.DataTable* GetSchema( 
   System.string* collectionName,
   System.string*[]* restrictionValues
) override 
public:
System.Data.DataTable^ GetSchema( 
   System.String^ collectionName,
   System.array<String^>^ restrictionValues
) override 

Parameters

collectionName
Specifies the name of the schema to return.
restrictionValues
Values to restrict for this lookup. See MSDN docs for more help on restricting collections.

Return Value

A DataTable that contains schema information.
Example
<<code lang="C#">> using (VistaDBConnection cn = new VistaDBConnection("Data Source=|DataDirectory|Database1.vdb5;")) { cn.Open(); DataTable schema = cn.GetSchema("FOREIGNKEYS"); foreach (DataRow dr in schema.Rows) { foreach (DataColumn dc in schema.Columns) { Console.WriteLine(dc.ColumnName + " = " + dr[dc].ToString()); } } } <</code>>
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also