当前位置: 首页 > 网络学院 > 服务端脚本教程 > ADO > ADO OpenSchema 方法

ADO
ADO DataTypes
ADO 摘要
ADO 实例

ADO OpenSchema 方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 410 ::
收藏到网摘: n/a

The OpenSchema method returns a Recordset object with schema information from the provider about the data source. For example, schema information can include the names of the tables, names of the columns in the tables, and the data type of each column. The Recordset will be opened as a read-only recordset.OpenSchema方法的作用是:返回带有数据源提供者Schema信息的Recordset对象。举例来说,schema信息可以包括表名称、表中的列名称以及每一列的数据类型。Recordset将以制度的方式打开。

Syntax
语法

Set rs=objconn.OpenSchema(querytype,criteria,schemaid)

Parameter参数 Description描述
querytype Required. A SchemaEnum value that represents the type of schema query to run
必要参数。用来代表所运行的Schema查询语句类型的一个SchemaEnum值

Note: The OLEDB specification only require 3 of the SchemaEnum values to be supported. These are adSchemaTables, adSchemaColumns, and the adSchemaProviderTypes
注意:在OLEDB规范中,只支持3个SchemaEnum值。他们分别是:adSchemaTables、adSchemaColumns和adSchemaProviderTypes

criteria Optional. An array of query constraints for each querytype option, as listed in SchemaEnum
可选参数。一个查询数组,用于限制querytype选项,具体请见SchemaEnum
schemaid The GUID for a provider-schema query not defined by the OLE DB specification. Required if querytype is set to adSchemaProviderSpecific
在OLE DB规范中并未定义provider-schema查询语句的GUID。如果querytype [查询类型]被设置为adSchemaProviderSpecific,那么必须设置该参数


SchemaEnum Values

Constant
常量
Value
Description
描述
Constraint Columns
限制列
adSchemaProviderSpecific -1 Used if the provider defines its own nonstandard schema queries
如果技术提供对象定义了本身的非标准Schema查询语句时使用该常量
Provider specific
adSchemaAsserts 0 Returns the assertions defined in the catalog
返回在目录中定义的声明
CONSTRAINT_CATALOG
CONSTRAINT_SCHEMA
CONSTRAINT_NAME
adSchemaCatalogs 1 Returns the physical attributes associated with catalogs accessible from the DBMS
返回与DBMS的目录及相关的物理属性
CATALOG_NAME
adSchemaCharacterSets 2 Returns the character sets defined in the catalog
返回在目录中定义的字符设置
CHARACTER_SET_CATALOG
CHARACTER_SET_SCHEMA
CHARACTER_SET_NAME
adSchemaCollations 3 Returns the character collations defined in the catalog
返回在目录中定义的字符校对
COLLATION_CATALOG
COLLATION_SCHEMA
COLLATION_NAME
adSchemaColumns 4 Returns the columns of tables defined in the catalog
返回在目录中定义的表列
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
COLUMN_NAME
adSchemaCheckConstraints 5 Returns the check constraints defined in the catalog
返回目录中定义检查限制
CONSTRAINT_CATALOG
CONSTRAINT_SCHEMA
CONSTRAINT_NAME
adSchemaConstraintColumnUsage 6 Returns the columns used by referential constraints, unique constraints, check constraints, and assertions, defined in the catalog
返回目录中定义的通过指示限制、独立限制、检查限制和声明所使用的列
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
COLUMN_NAME
adSchemaConstraintTableUsage 7 Returns the tables that are used by referential constraints, unique constraints, check constraints, and assertions defined in the catalog
返回目录中定义的通过指示限制、独立限制、检查限制和声明所使用的表
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
adSchemaKeyColumnUsage 8 Returns the columns defined in the catalog that are constrained as keys
返回目录中定义的列。该目录被限制为键[key]
CONSTRAINT_CATALOG
CONSTRAINT_SCHEMA
CONSTRAINT_NAME
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
COLUMN_NAME
AdSchemaReferentialConstraints 9 Returns the referential constraints defined in the catalog
返回目录中定义的指示限制
CONSTRAINT_CATALOG
CONSTRAINT_SCHEMA
CONSTRAINT_NAME
adSchemaTableConstraints 10 Returns the table constraints defined in the catalog
返回目录中定义的表限制
CONSTRAINT_CATALOG
CONSTRAINT_SCHEMA
CONSTRAINT_NAME
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
CONSTRAINT_TYPE
adSchemaColumnsDomainUsage 11 Returns the columns defined in the catalog that are dependent on a domain defined in the catalog
返回目录中定义的列限制。该目录是由目录中定义的域名决定的
DOMAIN_CATALOG
DOMAIN_SCHEMA
DOMAIN_NAME
COLUMN_NAME
adSchemaIndexes 12 Returns the indexes defined in the catalog
返回目录中定义的索引[Index]
TABLE_CATALOG
TABLE_SCHEMA
INDEX_NAME
TYPE
TABLE_NAME
adSchemaColumnPrivileges 13 Returns the privileges on columns of tables defined in the catalog
返回目录中定义的表列特权
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
COLUMN_NAME
GRANTOR
GRANTEE
adSchemaTablePrivileges 14 Returns the privileges on tables defined in the catalog
返回目录中定义的表特权
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
GRANTOR
GRANTEE
adSchemaUsagePrivileges 15 Returns the USAGE privileges on objects defined in the catalog
返回目录中定义的对象用法权限
OBJECT_CATALOG
OBJECT_SCHEMA
OBJECT_NAME
OBJECT_TYPE
GRANTOR
GRANTEE
adSchemaProcedures 16 Returns the procedures defined in the catalog
返回目录中定义的程序
PROCEDURE_CATALOG
PROCEDURE_SCHEMA
PROCEDURE_NAME
PROCEDURE_TYPE
adSchemaSchemata 17 Returns the schemas (database objects)
返回schema(数据库对象)
CATALOG_NAME
SCHEMA_NAME
SCHEMA_OWNER
adSchemaSQLLanguages 18 Returns the conformance levels, options, and dialects supported by the SQL-implementation processing data defined in the catalog.
返回目录中定义的SQL执行程序所支持的适应性级别和选项
None
adSchemaStatistics 19 Returns the statistics defined in the catalog
返回母丁中定义的统计表
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
adSchemaTables 20 Returns the tables defined in the catalog that are accessible
返回目录中定义的表。该目录是可以访问的
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
TABLE_TYPE
adSchemaTranslations 21 Returns the character translations defined in the catalog that are accessible
返回目录中定义的字符事务。该目录是可以访问的
TRANSLATION_CATALOG
TRANSLATION_SCHEMA
TRANSLATION_NAME
adSchemaProviderTypes 22 Returns the data types supported by the data provider
返回data provider[数据提供者]支持的数据类型
DATA_TYPE
BEST_MATCH
adSchemaViews 23 Returns the views defined in the catalog that are accessible
返回目录中定义的查看内容。该目录是可以访问的
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
adSchemaViewColumnUsage 24 Returns the columns on which viewed tables, are dependent
返回由可视表对象所决定的列
VIEW_CATALOG
VIEW_SCHEMA
VIEW_NAME
adSchemaViewTableUsage 25 Returns the tables on which viewed tables, are dependent
返回由可视表对象所决定的表
VIEW_CATALOG
VIEW_SCHEMA
VIEW_NAME
adSchemaProcedureParameters 26 Returns info about the parameters and return codes of procedures
返回参数信息以及程序代码
PROCEDURE_CATALOG
PROCEDURE_SCHEMA
PROCEDURE_NAME
PARAMETER_NAME
adSchemaForeignKeys 27 Returns the foreign key columns defined in the catalog
返回在目录中定义的foreign键
PK_TABLE_CATALOG
PK_TABLE_SCHEMA
PK_TABLE_NAME
FK_TABLE_CATALOG
FK_TABLE_SCHEMA
FK_TABLE_NAME
adSchemaPrimaryKeys 28 Returns the primary key columns defined in the catalog
返回在目录中定义的私钥
PK_TABLE_CATALOG
PK_TABLE_SCHEMA
PK_TABLE_NAME
adSchemaProcedureColumns 29 Returns info about the columns of rowsets returned by procedures
返回通过程序返回的rowset列信息
PROCEDURE_CATALOG
PROCEDURE_SCHEMA
PROCEDURE_NAME
COLUMN_NAME
adSchemaDBInfoKeywords 30 Returns a list of provider-specific keywords
返回技术提供者详细键的列表
None
adSchemaDBInfoLiterals 31 Returns a list of provider-specific literals used in text commands
返回在文本命令中使用的提供者的详细文字列表
None
adSchemaCubes 32 Returns info about the available cubes in a schema
返回Schema中可使用的三位数组信息
CATALOG_NAME
SCHEMA_NAME
CUBE_NAME
adSchemaDimensions 33 Returns info about the dimensions in a given cube
返回一个位于给定三位数组内的维数信息
CATALOG_NAME
SCHEMA_NAME
CUBE_NAME
DIMENSION_NAME
DIMENSION_UNIQUE_NAME
adSchemaHierarchies 34 Returns info about the hierarchies available in a dimension
返回在一个维数内可使用的层次信息
CATALOG_NAME
SCHEMA_NAME
CUBE_NAME
DIMENSION_UNIQUE_NAME
HIERARCHY_NAME
HIERARCHY_UNIQUE_NAME
adSchemaLevels 35 Returns info about the levels available in a dimension
返回在数组为数范围内可以使用的等级信息
CATALOG_NAME
SCHEMA_NAME
CUBE_NAME
DIMENSION_UNIQUE_NAME
HIERARCHY_UNIQUE_NAME
LEVEL_NAME
LEVEL_UNIQUE_NAME
adSchemaMeasures 36 Returns info about the available measures
返回可以利用的方法相关的信息
CATALOG_NAME
SCHEMA_NAME
CUBE_NAME
MEASURE_NAME
MEASURE_UNIQUE_NAME
adSchemaProperties 37 Returns info about the available properties for each level of the dimension
为不同级别数组维数返回可以使用的属性信息
CATALOG_NAME
SCHEMA_NAME
CUBE_NAME
DIMENSION_UNIQUE_NAME
HIERARCHY_UNIQUE_NAME
LEVEL_UNIQUE_NAME
MEMBER_UNIQUE_NAME
PROPERTY_TYPE
PROPERTY_NAME
adSchemaMembers 38 Returns info about the available members
返回可使用的成员信息
CATALOG_NAME
SCHEMA_NAME
CUBE_NAME
DIMENSION_UNIQUE_NAME
HIERARCHY_UNIQUE_NAME
LEVEL_UNIQUE_NAME
LEVEL_NUMBER
MEMBER_NAME
MEMBER_UNIQUE_NAME
MEMBER_CAPTION
MEMBER_TYPE
TREE OPERATOR
adSchemaTrustees 39 For future use
为将来使用
None

评论 (0) All

登陆 | 还没注册?