skip to main content
OpenAccess SDK SQL Engine core methods for .NET : Helper classes : schemaobj_stat class : SetObjInfo
 

SetObjInfo

This method is used to return schema information about table indexes and table statistics.
All values should be set. Set Null values as follows:
For a string, set the value to null.
For an integer, set the value to DAMOBJ_NOTSET.
Refer to Chapter 5 "Schema definition and management" in the OpenAccess SDK SQL Engine Programmer’s Guide for information about each of the values to set.
void SetObjInfo(
String table_qualifier,
String table_owner,
String table_name,
short non_unique,
String index_qualifier,
String index_name,
short type,
short seq_in_index,
String column_name,
String collation,
long cardinality,
int pages,
String filter_conditions)
 
Table 71: Parameters for SetObjInfo 
Parameter
Type
Description
IN
 
 
table_qualifier
String
The name of the database in which the table resides. It can be used to distribute tables into physically different databases. You would normally specify SCHEMA. The entry here is the same as you use in OA_COLUMNS and OA_TABLES.
table_owner
String
The owner of the table. You would normally set it to system or user.
table_name
String
The name of the table. This is how the end user refers to it.
non_unique
short
Indicates whether the index prohibits duplicate values:
TRUE (1) – the index values can be non-unique.
FALSE (0) – the index values must be unique.
NULL (empty) – if type is SQL_TABLE_STAT.
index_qualifier
String
The name of the database to which the table belongs.
index_name
String
The name of the index. This value must be NULL if type is SQL_TABLE_STAT.
type
short
The type of information returned. You should specify 1, 2, or 3 as the value for Microsoft Access to use the indexes. Valid values are:
SQL_TABLE_STAT (0) – a statistic for the table
SQL_INDEX_CLUSTERED (1) – a clustered index
SQL_INDEX_HASHED (2) – a hashed index
SQL_INDEX_OTHER (3) – another type of index
seq_in_index
short
The column sequence number in the index, starting with 1. Set to NULL if type is SQL_TABLE_STAT. This value is 1 if only one column defines the index.
column_name
String
The column identifier. Set to NULL if type is SQL_TABLE_STAT.
collation
String
The collation sequence. Valid values are:
A – ascending
D – descending
NULL – if type is SQL_TABLE_STAT or if no collation occurs
cardinality
long
The cardinality of the table or index. Used by the OpenAccess SDK SQL Engine to use an optimal index if this is not a unique index. Valid values are:
The number of rows in the table if type is SQL_TABLE_STAT.
The number of unique values in the index if type is not SQL_TABLE_STAT. High cardinality indexes are preferred for query optimization.
NULL if the value is not available from the data source.
pages
int
Reserved for future use. Set to DAMOBJ_NOTSET.
filter_conditions
String
Reserved for future use. Set to null.
RETURN
 
 
 
NONE