Special Edition Using Microsoft SQL Server 6.5 Second Edition

Previous chapterNext chapterContents


- G -
Data Access Objects 3.5 API

The Data Access Objects interface to database development gives you an easy-to-use, object, method, and property interface to your database. The DAO makes working with database tables a good deal easier and the API is largely the same from Visual Basic to C to Java, and even when working with newer advanced objects for developing on the Internet.

This appendix is meant as a dictionary into the different capabilities published by the DAO for use in your applications. Some objects may or may not support these methods, especially as they relate to database-centric controls. Always be sure to use these as a guideline, but the documentation with your specific controls should serve as final authority on the capabilities offered.

In this appendix, some options are language-specific, but most are generic across implementations. You'll be able to tell which are specific to a given language based on the definition provided. n

The DBEngine Object

The DAO 3.5 Object Model (see Figure G.1) must be created to perform any operations using DAO, except the new ODBC Direct functions. You also need to cast the DBEngine object to its interface when constructing a new instance of this object.

FIG. G.1
The DAO 3.5 Object Model.

Constructor DBEngine dao_engine = (_DBEngine) new dao_dbengine();

You need to use the ILicenseManager interface to create the instances (unlike RDO), because DAO requires a license to use.

Methods dbEngine._30_CreateWorkspace(String m_Name, String m_User, String m_Password)

Returns: A Workspace Object.

Table G.1 Arguments

Argument Data Type Description
m_Name String Sets the name for the Workspace object.
m_User String Sets the default user account for the Workspace object.
m_Password String Sets the default password for the Workspace object.

dbEngine.BeginTrans()

Begins a new Transaction.

dbEngine.CommitTrans(int)

Ends all Transactions for a single Workspace by saving the changes to the data source.

dbEngine.CompactDatabase(String m_OldDB, String m_NewDB, Variant m_Locale, Variant m_Options, Variant m_Password)

Copies and compacts a Jet database.

Table G.2 Arguments

Argument Data Type Description
m_OldDB String The full path to the database.
m_NewDB String A different path to the (new) database.
m_Locale Variant String CollatingOrderEnum constant. The password can also be changed by specifying dbSortPDXIntl & ";pwd=password".
m_Options Variant int DatabaseTypeEnum constant.
m_Password Variant String Specifies the password to use if the password is not set in the local argument.

dbEngine.CreateDatabase(String m_Name, String m_Locale , Variant)

Creates a new (physical) Jet database.

Table G.3 Arguments

Argument Data Type Description
m_Name String The absolute path and name of the database.
m_Locale String This specifies the collating order for creating the database, can also be used to specify the password: dbLangSpanish & ";pwd=NewPassword".
m_Options Variant DatabaseTypeEnum constant.

dbEngine.CreateWorkspace(String m_Name, String m_User , String m_Password, Variant m_Type)

Creates new Workspace object.

Return Type: A Workspace object.

Table G.4 Arguments

Argument Data Type Description
m_Name String Sets the name for the Workspace object.
m_User String Sets the default user account for the Workspace object.
m_Password String Sets the default password for the Workspace object.
m_Type Variant A variant containing a WorkspaceTypeEnum constant.

dbEngine.getDefaultType()

Returns: A value of WorkspaceTypeEnum corresponding to the default Workspace Type that any new Workspace objects will be created with.

Return Type: int

dbEngine.getErrors()

Returns an Errors collection for this object.

Return Type: An Errors object.

dbEngine.getIniPath()

Returns the path to the INI file.

Return Type: String

dbEngine.getLoginTimeout()

Returns the default login timeout.

Return Type: short

dbEngine.getProperties()

Returns the Properties Collection for this object.

Return Type: A Properties object.

dbEngine.getSystemDB()

Returns the path to the System Database, useful only on Microsoft Jet databases.

Return Type: String

dbEngine.getVersion()

Returns the version of the Jet engine.

Return Type: String

dbEngine.getWorkspaces()

Returns the Workspaces Collection for this object.

Data Type: A Workspaces Object.

dbEngine.Idle()

Allows the Jet engine to perform background processing immediately--similar to thread.sleep().

dbEngine.ISAMStats(int, Variant)

Action:

Table G.5 Arguments

Argument Data Type Description
int
Variant

dbEngine.OpenConnection(String, {Optional} Variant m_Prompt, {Optional} Variant m_ReadOnly, {Optional} Variant m_Connect)

Opens a connection to an ODBC data source.

Return Type: A Connection object.

Table G.6 Arguments

Argument Data Type Description
m_Name String Sets the name for the connection.
m_Prompt Variant int A DriverPromptEnum constant.
m_ReadOnly Variant Boolean True if the connection is to be opened for read-only access.
m_Connect Variant String An ODBC connect string.

dbEngine.OpenDatabase(String, {Optional} Variant m_Prompt, {Optional} Variant m_ReadOnly, {Optional} Variant m_Connect)

Opens a database.

Return Type: A Database object.

Table G.7 Arguments

Argument Data Type Description
m_Name String The name of the Jet database or ODBC DSN.
m_Prompt Variant int A DriverPromptEnum constant.
m_ReadOnly Variant Boolean True if the connection is to be opened for read-only access.
m_Connect Variant String An ODBC connect string.

dbEngine.putDefaultPassword(String m_Password)

Sets the default password.

Table G.8 Argument

Argument Data Type Description
m_Password String A password.

dbEngine.putDefaultType(int m_DefaultType)

Sets the default type of Workspace object that will be created next.

Table G.9 Argument

Argument Data Type Description
m_DefaultType int A constant matching a value in WorkspaceTypeEnum.

dbEngine.putDefaultUser(String m_UserName)

Sets the default user account for new Workspaces created with this dbEngine object.

Table G.10 Argument

Argument Data Type Description
m_UserName String The user account to use by default for new Workspaces.

dbEngine.putIniPath(String m_IniPath)

Sets the Registry key from which to read settings.

Such as: dbEngine.putIniPath("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\ ISAM Formats\FoxPro 3.0").

Table G.11 Argument

Argument Data Type Description
m_IniPath String A registry key or path to an INI file.

dbEngine.putLoginTimeout(short m_defaultTimeout)

Sets the default login timeout.

Data Type: short

Table G.12 Argument

Argument Data Type Description
m_defaultTimeout short The timeout value, specified in seconds.

dbEngine.putSystemDB(String m_SysDB)

Sets the Microsoft Jet Workgroup access file.

Table G.13 Argument

Argument Data Type Description
m_SysDB String Path to the System database.

dbEngine.RegisterDatabase(String m_DSN, String m_Driver, Boolean m_Silent, String m_Attributes)

Registers a new ODBC data source.

Table G.14 Arguments

Argument Data Type Description
m_DSN String Data Source Name.
m_Driver String Friendly name of the driver as shown in the ODBC Administrator. (Not the file name.)
m_Silent Boolean Set to true if you don't want to show the ODBC Register Data Source dialog box. (This will be ignored if you don't provide complete information.)
m_Attributes String A list of keywords to be added to the Windows Registry.

dbEngine.RepairDatabase(String m_DBName)

Attempts to repair a Jet database.

Table G.15 Argument

Argument Data Type Description
m_DBName String Absolute path to the Jet database file.

dbEngine.Rollback()

Action: Ends all transactions created by this DBEngine object by throwing away the buffered changes.

SetOption(int m_Parameter, Variant m_NewValue)

Overrides registry settings.

Table G.16 Arguments

Argument Data Type Description
m_Parameter int A SetOptionEnum Constant.
m_NewValue Variant The new value of the parameter.

The Error Object

Constructor Error m_objError;

Methods int getNumber(); Returns: The error number.

Return Type: int

String getDescription();

Returns: A description of the error.

Return Type: String

String getHelpFile();

Returns: The path to the help file associated with the source of the error.

Return Type: String

int getHelpContext();

Returns the help context ID.

Return Type: int

String getSource();

Returns the source of the error.

Return Type: String

The Workspace Object

Constructor Workspace m_objWorkpsace = dbEngine.CreateWorkspace(String Name, String User, String Password, Variant Type)

Methods Workspace.put_30_UserName(String m_strUser); Sets the default user account for this Database object.

Table G.17 Argument

Argument Data Type Description
m_strUser String Name of the default user.

Workspace.getDatabases();

Returns the Databases Collection.

Return Type: A Databases object.

Workspace.CreateDatabase(String m_Name, String m_Locale, Variant)

Creates a new (physical) Jet database.

Table G.18 Arguments

Argument Data Type Description
m_Name String The absolute path and name of the database.
m_Locale String This specifies the collating order for creating the database, can also be used to specify the password: dbLangSpanish & ";pwd=NewPassword".
m_Options Variant DatabaseTypeEnum constant.

Workspace.getLoginTimeout();

Returns the default login timeout for this Database object.

Return Type: int

Workspace.putLoginTimeout(int m_iLoginTimeout);

Sets the default login timeout for this Database object.

Workspace.getUsers();

Returns the Users collection for this object.

Return Type: A Users object.

Workspace.put_30_Password(String m_Password);

Sets the default password for objects created through this object using DAO 3.0 Syntax.

Table G.19 Argument

Argument Data Type Description
m_Password Variant (String) Sets the password for the new user account.

Workspace.CreateUser({Optional} Variant m_Name, {Optional} Variant m_PID, {Optional} Variant m_Password);

Returns: A new User object.

Table G.20 Arguments

Argument Data Type Description
m_Name Variant (String) Sets the name for the user.
m_PID Variant (String) An identifier 4-20 characters in length--alphanumeric.
m_Password Variant (String) Sets the password for the new user account.

Workspace.BeginTrans();

Begins a new transaction for this Workspace.

Workspace.CommitTrans(int );

Ends all transactions within this workspace by saving the changes made.

Workspace.OpenConnection(String m_DSN, Variant m_VOptions, Variant m_vReadOnly, Variant m_vConnect);

Returns: A new Connection object.

Table G.21 Arguments

Argument Data Type Description
m_DSN String The Data Source name.
m_vOptions Variant (int) Any combination of DriverPromptEnum constants and/or RecordsetOptionEnum.dbAsyncEnable.
m_vReadOnly Variant(Boolean) Sets the access to read only if True.
m_vCoect Variant (String) A variant containing an ODBC connection string.

Workspace.getDefaultCursorDriver();

Returns the default cursor for Recordsets opened on this Database object.

Return Type: int

Workspace.putDefaultCursorDriver(int m_CursorDriver)

Sets the default cursor for Recordsets opened on this Database object.

Table G.22 Argument

Argument Data Type Description
m_CursorDriver int A constant of CursorDriverEnum type.

Workspace.getIsolateODBCTrans()

Returns: The Isolation Level for this Database.

Workspace.getName();

Returns the name for this Database object.

Return Type: String

Workspace.putName(String m_dbname);

Sets the name for the database object.

Returns a new Database object.

Table G.23 Arguments

Argument Data Type Description
m_Name String The name of the actual database file or DSN.
m_vOptions Variant (Boolean) True for exclusive access, False for shared access.
m_vReadOnly Variant(Boolean) Sets the access to read only if True.
m_vConnect Variant (String) A variant containing a connection string.

Workspace.putIsolateODBCTrans(short m_dbIsolationLevel);

Sets the whether or not the transactions are isolated.

Table G.24 Argument

Argument Data Type Description
m_dbIsolationLevel short A value of 0 or 1.

Workspace.Close();

Closes the open Database object.

Workspace.OpenDatabase(String m_dbName, Variant m_vOptions, Variant m_vReadOnly, Variant m_vConnect);

Returns a new Database object.

Table G.25 Arguments

Argument Data Type Description
m_dbName String The name of the actual database file or DSN.
m_vOptions Variant (Boolean) True for exclusive access, False for shared access.
m_vReadOnly Variant (Boolean) Sets the access to read only if True.
m_vConnect Variant (String) A variant containing a connection string.

Workspace.Rollback();

Rolls back any transactions pending for the current Workspace or Connection.

Workspace.CreateGroup({Optional} Variant m_Name, {Optional} Variant m_PID);

Creates a new group.

Table G.26 Arguments

Argument Data Type Description
m_Name Variant (String) Name of the new group.
m_vSQL Variant (String) PID of the new group ( 4-20 alphanumeric characters).

Workspace.getType();

Returns a DatabaseTypeEnum constant.

Return Type: int

Workspace.gethEnv();

Returns the ODBC Environment handle.

Return Type: int

Workspace.getConnections();

Returns the Connections Collection for this Database.

Return Type: A Connections object.

Workspace.getProperties();

Returns the Properties Collection for this Database.

Return Type: A Properties object.

Workspace.getGroups();

Returns the Groups Collection for this Database.

Return Type: A Groups object.

Workspace.getUserName();

Returns the user account with which this Database object was accessed.

Return Type: String

The Database Object

Constructor Database = Workspace.CreateDatabase();

-or-

Database = Workspace..OpenDatabase();

Methods Database.Close();

Closes an open Database object.

Database.CreateProperty(Variant m_PropName, Variant m_vType, Variant m_vDataType, Variant m_vDDL);

Creates a new Property.

Return Type: A Property object.

Table G.27 Arguments

Argument Data Type Description
m_PropName Variant (String) The name of the new Property.
m_vType Variant (int) A member of the DataTypeEnum constants.
m_vDataType Variant The initial property value.
m_vDDL Variant (Boolean) True if this property is a Data Definition Language property.

Database.CreateRelation(Variant m_RelationName, Variant m_vPrimary, Variant m_vForeign, Variant m_vAttributes);

Creates a new relation object. (Jet Workspaces only)

Return Type: A Relation object.

Table G.28 Arguments

Argument Data Type Description
m_RelationName Variant (String) The name of the Relation to be created.
m_vPrimary Variant (String) Name of the primary table in the relation.
m_vForeign Variant (String) Name of the foreign table in the relation.
m_vAttributes Variant (String) A member of the RelationAttributeEnum constants.

Database.CreateQueryDef(Variant m_Name, Variant m_vSQL);

Returns a new QueryDef object.

Table G.29 Arguments

Argument Data Type Description
m_Name String The name of the new QueryDef.
m_vSQL Variant (String) A variant containing a SQL Statement.

Database.CreateTableDef(Variant m_dbName, Variant m_vAttributes, Variant m_vSource, Variant m_vConnect);

Returns a new TableDef object.

Table G.30 Arguments

Argument Data Type Description
m_dbName String The name of the actual database file or DSN.
m_vAttributes Variant (int) A member of the TableDefAttributeEnum constants.
m_vSource Variant (String) Sets the source table name for the TableDef.
m_vConnect Variant (String) A variant containing a connection string.

Database.Execute(String, Variant);

Executes a SQL statement or QueryDef object.

Table G.31 Arguments

Argument Data Type Description
m_Source String The SQL statement or name of a QueryDef.
m_vConnect Variant (int) A member of the RecordsetOptionEnum constants.

Database.getCollatingOrder();

Returns the collating order for this Database.

Return Type: An int matching a value in LanguageConstants.

Database.getConnect();

Returns the connection string used to create this Database object.

Return Type: String

Database.getContainers();

Returns the Containers Collection for this Database.

Return Type: A Containers object.

Database.getRecordsAffected();

Returns the number of records affected in the last Execute method.

Return Type: int

Database.getName();

Returns the name for this Database.

Return Type: String

Database.getDesignMasterID();

Returns the GUID for the master replica Database.

Return Type: String

Database.getRecordsets();

Returns the Recordsets Collection for this Database.

Return Type: A Recordsets object.

Database.getReplicaID();

Returns the Replica Collection for this Database.

Return Type: String

Database.getTableDefs();

Returns the TableDefs Collection for this Database.

Return Type: A TableDefs object.

Database.getQueryDefs();

Returns the QueryDefs Collection for this Database.

Return Type: A QueryDefs object.

Database.getQueryTimeout();

Returns the QueryTimeout Collection for this Database.

Return Type: A Connections object.

Database.getRelations();

Returns the Relations Collection for this Database.

Return Type: A Relations object.

Database.getTransactions();

Returns whether or not this object supports transactions.

Return Type: Boolean

Database.getConnection();

Returns the Connection object for this Database.

Return Type: A Connection object.

Database.getProperties();

Returns the PropertiesCollection for this Database.

Return Type: A Properties object.

Database.getUpdatable();

Returns whether this object allows changes.

Return Type: Boolean

Database.getVersion();

Returns the version of the Jet engine used to create this Database.

Return Type: String

Database.MakeReplica(String m_ReplicaName, String m_Description, Variant m_vOption);

Creates a replica of the database.

Table G.32 Arguments

Argument Data Type Description
m_ReplicaName String The path and file name to the replica.
m_Description String Description of the replica.
m_vOption Variant (int) A member of the ReplicaTypeEnum constants.

Database.NewPassword(String m_OldPassword, String m_NewPassword);

Changes the password of the database.

Table G.33 Arguments

Argument Data Type Description
m_OldPassword String The old password.
m_NewPassword String An alphanumeric string representing the new password.

Database.OpenQueryDef(String m_Name);

Returns an existing QueryDef object.

Table G.34 Argument

Argument Data Type Description
m_Name String The name of the QueryDef stored in the database.

Database._30_OpenRecordset(String m_Source, Variant m_vType, Variant m_vOption);

Returns a new Recordset object (using DAO 3.0 syntax).

Table G.35 Arguments

Argument Data Type Description
m_Source String The name of the actual database file or DSN.
m_vType Variant (int) A member of the RecordsetTypeEnum constants.
m_vOption Variant (int) A member of the RecordsetOptionsEnum constants.

Database.OpenRecordset(String m_Source, Variant m_vType, Variant m_vOption, Variant m_vLockType);

Returns a new Recordset object.

Table G.36 Arguments

Argument Data Type Description
m_Source String The name of the actual database file or DSN.
m_vType Variant (int) A member of the RecordsetTypeEnum constants.
m_vOption Variant (int) A member of the RecordsetOptionsEnum constants.
m_vLockType Variant (int) A member of the LockTypeEnum constants.

. Database.putConnect(String m_ConnectString);

Sets the connection information for this object.

Table G.37 Argument

Argument Data Type Description
m_ConnectString String Semicolon-separated string of Connection parameters.

Database.PopulatePartial(String);

Repopulates a partial replica with fresh information.

Table G.38 Argument

Argument Data Type Description
m_Target String The name of the target database to replicate with.

Database.putDesignMasterID(String m_GUID);

Sets the GUID for the Design Master in a replication environment.

Table G.39 Argument

Argument Data Type Description
m_GUID String The GUID of the master design database.

Database.Synchronize(String m_Target, Variant m_Direction);

Sets the target and the direction of synchronization between two database replicas.

Table G.40 Arguments

Argument Data Type Description
m_Target String The absolute path to the replica database file.
m_Direction Variant A member of SynchronizeTypeEnum constants.

Database.putQueryTimeout(short m_Timeout);

Sets the default query timeout for this database.

Table G.41 Argument

Argument Data Type Description
m_Timeout short The number of seconds to wait before timing out a Query.

The Connection Object

Constructor connection object = Workspace.OpenConnection()

Methods void Cancel(); Action: Cancels a pending update.

void Close();

Closes an open Database object.

CreateQueryDef(Variant m_Name, Variant m_vSQL);

Returns a new QueryDef object.

Table G.42 Arguments

Argument Data Type Description
m_Name String The name of the new QueryDef.
m_vSQL Variant (String) A variant containing a SQL Statement.

void Execute(String m_Source, Variant m_vConnect);

Executes a SQL statement or QueryDef object.

Table G.43 Arguments

Argument Data Type Description
m_Source String The SQL statement or Name of a QueryDef.
m_vConnect Variant (int) A member of the RecordsetOptionEnum constants.

String getConnect();

Returns the connection string used to create this Database object.

Return Type: String

int getRecordsAffected();

Returns the number of records affected in the last Execute method.

Return Type: int

Database getDatabase();

Returns the Database object for this connection.

Return Type: A Database object.

int gethDbc();

Returns the ODBC connection handle for this Connection.

Return Type: int

String getName();

Returns the name for this Connection object.

Return Type: String

getRecordsets();

Returns the Recordsets Collection for this Database.

Return Type: A Recordsets object.

getQueryDefs();

Returns the QueryDefs Collection for this Database.

Return Type: A QueryDefs object.

short getQueryTimeout();

Returns the default query timeout for this Connection.

Return Type: short

Boolean getStillExecuting();

Returns True if the asynchronous query is still executing.

Return Type: Boolean

Boolean getTransactions();

Returns whether or not this object supports transactions.

Return Type: Boolean

Boolean getUpdatable();

Returns whether this object allows changes.

Return Type: Boolean

OpenRecordset(String m_Source, Variant m_vType, Variant m_vOption, Variant m_vLockType);

Returns a new Recordset object.

Table G.44 Arguments

Argument Data Type Description
m_Source String The name of the actual database file or DSN.
m_vType Variant (int) A member of the RecordsetTypeEnum constants.
m_vOption Variant (int) A member of the RecordsetOptionsEnum constants.
m_vLockType Variant (int) A member of the LockTypeEnum constants.

void putConnect(String m_ConnectString);

Sets the connection information for this object.

Table G.45 Argument

Argument Data Type Description
m_ConnectString String Semicolon-separated string of Connection parameters.

void putQueryTimeout(short m_Timeout);

Sets the default query timeout for this database.

Table G.46 Argument

Argument Data Type Description
m_Timeout short The number of seconds to wait before timing out a Query.

Recordset Object

Constructor recordset = recordset.OpenRecordset() recordset = tabledef.OpenRecordset()

recordset = querydef.OpenRecordset()

recordset = Connection.OpenRecordset()

recordset = Database.OpenRecordset()

Methods void _30_CancelUpdate();

Cancels any pending updates.

void _30_MoveLast();

Moves the cursor to the last record in the Recordset. (No option to run asynchronously.)

void _30_Update();

Saves the changes made to a Recordset.

void AddNew();

Adds a new record to the Recordset.

void Cancel();

Cancels a MoveLast or OpenRecordset method call.

void CancelUpdate(int m_Type);

Cancels pending updates. Allows for you to specify the type of updates.

Table G.47 Argument

Argument Data Type Description
m_Type int A member of the UpdateTypeEnum.

Recordset Clone();

Clones the current Recordset Object (except for the Indexes).

void Close();

Closes the Recordset object.

QueryDef CopyQueryDef();

Returns a new QueryDef object that is a copy of the query used to create the Recordset object.

Return Type: A QueryDef object.

void Delete();

Deletes the current record from the Recordset.

void Edit();

Copies the current record to an Edit Buffer, and saves the changes made to the buffer. Use the Update method to save the changes permanently.

void FillCache({Optional} Variant m_iRows, {Optional} Variant m_vBookmark);

Table G.48 Arguments

Argument Data Type Description
m_viRows Variant (integer) The number of rows to hold in the cache.
m_vBookmark Variant (String) The bookmark to begin filling the cache from.

void FindFirst(String m_SearchCriteria);

Moves the cursor to the first occurrence of the specified string.

Table G.49 Argument

Argument Data Type Description
m_SearchCriteria String A string value.

void FindLast(String);

Finds the last record that matches the string value specified and positions the cursor on that record.

Table G.50 Argument

Argument Data Type Description
m_SearchCriteria String A string value.

void FindNext(String);

Returns the next record matching the specified search string, and sets the cursor to the record's position.

Table G.51 Argument

Argument Data Type Description
m_strSearch String The search string.

void FindPrevious(String m_SearchCriteria);

Find the record previous to the current record that matches the string value specified and positions the cursor on that record.

Table G.52 Argument

Argument Data Type Description
m_SearchCriteria String A string value.

int getAbsolutePosition();

Returns the ordinal position of the current record.

Return Type: int:

Variant getBatchCollisions();

Returns an array of bookmarks indicating the records where the collisions took place.

Return Type: Variant

int getBatchCollisionCount();

Returns the number of collisions encountered in the last Batch Update.

Return Type: int

int getBatchSize();

Returns the number of statements that can be sent to the Server at once.

Return Type: int

Boolean getBOF();

Returns whether or not the current record is the beginning of the Recordset.

Return Type: Boolean

Boolean getBookmarkable();

Returns whether or not the Recordset supports bookmarks.

Return Type: Boolean

SafeArray getBookmark();

Returns the bookmark of the current record.

Return Type: SafeArray

SafeArray getCacheStart();

Returns the bookmark of the first record in a dynaset-type Recordset object to be locally cached from the ODBC data source (Jet Workspaces only).

Return Type: SafeArray

int getCacheSize();

Returns the number of rows that can be held in the cache.

Return Type: int

Variant getCollect(Variant m_vFieldName);

Returns the value of a field.

Return Type: Variant

Table G.53 Argument

Argument Data Type Description
m_FieldName Variant (String) The name of a field in the Recordset.

Connection getConnection();

Returns the Connection associated with this Recordset.

Return Type: A Connection object.

Variant getDateCreated();

Returns the date the base table was created.

Return Type: Variant

short getEditMode();

Returns EditModeEnum constants value.

Return Type: short

Boolean getEOF();

Returns true if the current position of the cursor is at the end of the recordset.

Return Type: Boolean

Fields getFields();

Returns the Fields Collection for this Recordset.

Return Type: A Fields object.

String getFilter();

The setting or return value is a String data type that contains the WHERE clause of an SQL statement without the reserved word WHERE.

String getIndex();

Returns the index being used by this Recordset object.

Return Type: String

Indexes getIndexes();

Returns the Indexes Collection for the current Recordset.

Return Type: An Indexes object.

int gethStmt();

Returns the ODBC statement handle.

Return Type: int

Variant getLastUpdated();

SafeArray getLastModified();

Returns a bookmark of the last modified record.

Return Type: SafeArray

Boolean getLockEdits();

Returns the locking in effect, True for Pessimistic and False for Optimistic.

String getName();

Returns the first 256 characters of the SQL statement used to create this Recordset.

Return Type: String

Boolean getNoMatch();

Specifies whether the last search or seek operation returned a match.

Return Type: Boolean (False if a match is found)

int getODBCFetchCount();

Returns the number of records fetched at one time from the server.

Return Type: int

int getODBCFetchDelay();

Returns the estimated latency of the last ODBC fetch.

Return Type: int

Database getParent();

float getPercentPosition();

Returns the position of the cursor as being a percentage relative to the entire Recordset.

Return Type: float

Properties getProperties();

Returns the Properties Collection for this Recordset object.

Return Type: A Properties object.

int getRecordCount();

Returns the number of records in the Recordset.

Return Type: int

short getRecordStatus();

Returns a value matching a RecordStatusEnum constant.

Return Type: short

Boolean getRestartable();

Returns whether or not the Recordset supports the Requery method.

Return Type: Boolean

Variant GetRows(Variant m_vNumrows);

Returns an array of records.

Return Type: Variant array

Table G.54 Argument

Argument Data Type Description
m_vNumrows Variant (int) The number of rows to return with this method.

Boolean getStillExecuting();

Returns whether or not an asynchronous operation is still executing.

Return Type: Boolean

String getSort();

Returns the parameters of the ORDER BY clause in the SQL Statement that created this Recordset object.

Return Type: String

Boolean getTransactions();

Return whether or not transactions are supported for this Recordset.

Return Type: Boolean

short getType();

Returns a constant of RecordsetTypeEnum constants.

Return Type: short

int getUpdateOptions();

Returns the type of Update options that are being used with a Batch update.

Return Type: int (of type UpdateCriteriaEnum)

Boolean getUpdatable();

Returns whether or not the Recordset supports changes.

Retun Type: Boolean

String getValidationText();

Returns the text of the message your application displays if the value of a Field object doesn't satisfy the validation rule (Jet Workspaces only).

Return Type: String

String getValidationRule();

Returns the update, insert, or delete constraints on the object.

Return Type: String

void Move(int m_iRows, Variant m_vBookmark);

Moves the cursor a specified number of rows from this bookmark, or from a specific bookmark.

Table G.55 Arguments

Argument Data Type Description
m_iRows int The number of rows to move. (Can be positive or negative.)
m_vBookmark Variant A bookmark to begin the move from.

void MoveFirst();

Moves the cursor to the first record in the Recordset.

void MoveLast({Optional} RecordsetOptionEnum.dbRunAsync);

Moves the cursor to the last record in the Recordset.

Table G.56 Argument

Argument Data Type Description
dbRunAsync int Use to enable asynchronous execution of this method.

void MoveNext();

Moves the cursor to the next position.

void MovePrevious();

Moves the cursor to the previous record.

Boolean NextRecordset();

Loads the next batch of records (from a different query) into the Recordset object.

Return Type: Boolean (True if more Recordsets are available)

Recordset OpenRecordset(Variant m_vOptions, Variant m_vLockType);

Opens a Recordset on this Recordset of the same type, except for TableType recordsets (which return a dynaset type).

Table G.57 Arguments

Argument Data Type Description
m_vOption Variant (int) A member of the RecordsetOptionsEnum constants.
m_vLockType Variant (int) A member of the LockTypeEnum constants.

void putAbsolutePosition(int m_Ordinal);

Sets the position of the cursor to a specific record using the ordinal value of its place in the Recordset.

Table G.58 Argument

Argument Data Type Description
m_Ordinal int The row number to which to move the cursor.

void putBatchSize(int m_BatchSize);

Sets the number of statements sent to the server in each Batch.

void putBookmark(SafeArray m_Bookmark);

Sets the bookmark for the current record.

Table G.59 Arguments

Argument Data Type Description
m_BookMark SafeArray A string of bytes representing a unique ID -- a bookmark.

void putCacheSize(int m_nRows);

Sets the cache to a specified number of rows.

Table G.60 Argument

Argument Data Type Description
m_nRows int The number of rows to hold in the cache.

void putCacheStart(SafeArray m_Bookmark);

Sets the bookmark of the first record in a dynaset-type Recordset object to be locally cached from the ODBC data source (Jet Workspaces only).

Table G.61 Argument

Argument Data Type Description
m_Bookmark SafeArray A bookmark.

void putCacheSize(int m_nRows);

Sets the cache to a specified number of rows.

Table G.62 Argument

Argument Data Type Description
m_nRows int The number of rows to hold in the cache.

void putCollect(Variant m_vFieldName, Variant m_vValue);

Sets the value of a field.

Table G.63 Arguments

Argument Data Type Description
m_FieldName Variant (String) The Field Name to populate.
m_vValue Variant The field value.

void putConnection(Connection m_objConnection);

Sets the Connection object for this Recordset.

Table G.64 Argument

Argument Data Type Description
m_objConnection Connection The Connection object to associate.

void putFilter(String m_strFilter);

The setting or return value is a String data type that contains the WHERE clause of an SQL statement without the reserved word WHERE.

Table G.65 Argument

Argument Data Type Description
m_strFilter String Filter criteria in the SQL WHERE clause.

void putIndex(String m_Index);

Sets the index for the Recordset.

Table G.66 Argument

Argument Data Type Description
m_Index String The name of an index object in the indexes collection.

void putLockEdits(Boolean);

Sets the locking for the Recordset, True for Pessimistic and False for Optimistic.

void putPercentPosition(float m_Position);

Moves the cursor a specified percentage of the way through the Recordset.

Table G.67 Argument

Argument Data Type Description
m_Position float The percentage to move through the recordset.

void putSort(String);

Sets the Sort Order for a dynaset or snapshot style Recordset.

Table G.68 Argument

Argument Data Type Description
m_SortString String A string representing the parameters of the SQL ORDER BY clause.

void putUpdateOptions(int m_UpdateOptions);

Sets the update options for a Batch update.

Table G.69 Argument

Argument Data Type Description
m_UpdateOptions int A constant of the UpdateCriteriaEnum.

void Requery(Variant);

void Seek(String m_Operand, Variant m_Key1, Variant m_Key 2...Variant m_Key13);

Locates the next record matching the values in the Key fields and positions the cursor on the new record.

Table G.70 Arguments

Argument Data Type Description
m_Operator String A logical operand.
m_Key Variant Up to 13 values corresponding to fields in the Recordset object's current index, as specified by its Index property setting.

void Update(int m_UpdateType, Boolean m_forceUpdate);

Saves the changes made to a Recordset.

Table G.71 Arguments

Argument Data Type Description
m_UpdateType int A value matching a member of UpdateTypeEnum constants.
m_forceUpdate Boolean Set to true to overwrite any changes made since the recordset was fetched.

The TableDef Object

Constructor

Methods Field CreateField({Optional} Variant m_vName, {Optional}, {Optional} Variant m_vDataType, Variant m_vSize);

Table G.72 Arguments

Argument Data Type Description
m_vName Variant (String) The name of the Field to be created.
m_vDataType Variant (int) A member of the DataTypeEnum constants.
m_vSize Variant (int) The size of the Field (Read/Write only for a Text field, up to 255).

Index CreateIndex(Variant m_vName);

Creates an index for the TableDef.

Table G.73 Argument

Argument Data Type Description
m_vName Variant (String) The name of the Index.

int getAttributes();

Returns the attributes for this TableDef.

Return Type: int (of type TableAttributesEnum)

String getConflictTable();

Returns the path to the conflict table if one exists.

Return Type: String

String getConnect();

Returns the connection string used to create this Database object.

Return Type: String

Variant getDateCreated();

Returns the date the table was created.

Return Type: Variant

Fields getFields();

Returns the Fields collection for this TableDef.

Return Type: A Fields object.

Indexes getIndexes();

Returns the Indexes collection for this TableDef.

Return Type: An Indexes object

Variant getLastUpdated();

Returns the last time this table was updated.

Return Type: Variant

Variant getReplicaFilter();

Returns the SQL WHERE clause (or Boolean value) used to filter the data that is replicated.

Return Type: Variant

int getRecordCount();

Returns the number of records in the TableDef.

Return Type: int

Variant getLastUpdated();

Returns the last time this table was updated.

Return Type: Variant

String getName();

Returns the Name of the Variant

Return Type: String

String getValidationRule();

Returns the update, insert, or delete constraints on the object.

Return Type: String

String getValidationText();

Returns the text of the message your application displays if the value of a Field object doesn't satisfy the validation rule (Jet Workspaces only).

Return Type: String

Properties getProperties();

Returns the Properties collection for this TableDef.

Return Type: A Properties object.

String getSourceTableName();

Returns the source table of this TableDef.

Return Type: String

void putAttributes(int);

Sets the Attributes for this TableDef.

Table G.74 Arguments

Argument Data Type Description
m_vOption Variant (int) A member of the RecordsetOptionsEnum constants.
m_vLockType Variant (int) A member of the LockTypeEnum constants.

void putConnect(String m_ConnectString);

Sets the connection information for this object.

Table G.75 Argument

Argument Data Type Description
m_ConnectString String Semicolon-separated string of Connection parameters.

void putName(String);

Table G.76 Arguments

Argument Data Type Description
m_vOption Variant (int) A member of the RecordsetOptionsEnum constants.
m_vLockType Variant (int) A member of the LockTypeEnum constants.

void putReplicaFilter(Variant);

Sets the filter (A SQL WHERE clause) or sets the replication to all records, or none.

Table G.77 Argument

Argument Data Type Description
m_vFilter Variant A Boolean or String value.

void putSourceTableName(String);

Sets the Source of the TableDef.

Table G.78 Arguments

Argument Data Type Description
m_vOption Variant (int) A member of the RecordsetOptionsEnum constants.
m_vLockType Variant (int) A member of the LockTypeEnum constants.

void putValidationRule(String m_Rule);

Table G.79 Argument

Argument Data Type Description
m_Rule String A member of the RecordsetOptionsEnum constants.

Recordset OpenRecordset(Variant m_vOptions, Variant m_vLockType);

Opens a Recordset on this Recordset of the same type, except for TableType recordsets (which return a dynaset type).

Table G.80 Arguments

Argument Data Type Description
m_vOption Variant (int) A member of the RecordsetOptionsEnum constants.
m_vLockType Variant (int) A member of the LockTypeEnum constants.

void RefreshLink();

Refreshes the Connection information for a linked table. (Used to update the Connection string after changing it with the putconnect method.)

The QueryDef Object

Constructor QueryDef = Database.CreateQueryDef()

Methods QueryDef _Copy(); void Cancel();

Cancels a MoveLast or OpenRecordset method call.

void Close ();

Closes the open QueryDef object.

void Compare(, short[]);

CreateProperty(Variant m_PropName, Variant m_vType, Variant m_vDataType, Variant m_vDDL);

Creates a new Property.

Return Type: A Property object.

Table G.81 Arguments

Argument Data Type Description
m_PropName Variant (String) The name of the new Property.
m_vType Variant (int) A member of the DataTypeEnum constants.
m_vDataType Variant The initial property value.
m_vDDL Variant (Boolean) True if this property is a Data Definition Language property.

void Execute(String m_Source, Variant m_vConnect);

Executes a SQL statement or QueryDef object.

Table G.82 Arguments

Argument Data Type Description
m_Source String The SQL statement or Name of a QueryDef.
m_vConnect Variant (int) A member of the RecordsetOptionEnum constants.

int getCacheSize();

Returns the number of rows that can be held in the cache.

Return Type: int

String getConnect();

Returns the connection string used to create this Database object.

Return Type: String

Variant getDateCreated();

Returns the date the table was created.

Return Type: Variant

Fields getFields();

Returns the Fields collection for this TableDef.

Return Type: A Fields object.

int gethStmt();

Returns the ODBC statement handle.

Return Type: int

Variant getLastUpdated();

Returns the last time this QueryDef was updated.

Return Type: Variant

int getMaxRecords();

Returns the maximum number of records that can be retrieved from the server in a single fetch.

Return Type: int

String getName();

Returns the Name of the integer

Return Type: String

short getODBCTimeout();

Returns the ODBC timeout in seconds.

Return Type: short

Parameters getParameters();

Returns the Parameters collection.

Return Type: A Parameters object.

Variant getPrepare();

Properties getProperties();

Returns the Properties collection for this QueryDef.

Return Type: A Properties object.

int getRecordsAffected();

Returns the number of records affected by the last Execute method call.

Return Type: int

Boolean getReturnsRecords();

Returns whether or not this QueryDef returns a recordset.

Return Type: Boolean

String getSQL();

Returns the SQL property of the QueryDef.

Return Type: String

Boolean getStillExecuting();

Returns whether or not an asynchronous operation is still executing.

Return Type: Boolean

short getType();

Returns a constant of RecordsetTypeEnum constants.

Return Type: short

Recordset _30_OpenRecordset(String m_Source, Variant m_vType);

Returns a new Recordset object.

Table G.83 Arguments

Argument Data Type Description
m_Source String The name of the actual database file or DSN.
m_vType Variant (int) A member of the RecordsetTypeEnum constants.

Recordset _30__OpenRecordset(String m_Source, Variant m_vType);

Returns a new Recordset object.

Table G.84 Arguments

Argument Data Type Description
m_Source String The name of the actual database file or DSN.
m_vType Variant (int) A member of the RecordsetTypeEnum constants.

Recordset OpenRecordset(String m_Source, Variant m_vType, Variant m_vOption,);

Returns a new Recordset object.

Table G.85 Arguments

Argument Data Type Description
m_Source String The name of the actual database file or DSN.
m_vType Variant (int) A member of the RecordsetTypeEnum constants.
m_vOption Variant (int) A member of the RecordsetOptionsEnum constants.

OpenRecordset(String m_Source, Variant m_vType, Variant m_vOption, Variant m_vLockType);

Returns a new Recordset object.

Table G.86 Arguments

Argument Data Type Description
m_Source String The name of the actual database file or DSN.
m_vType Variant (int) A member of the RecordsetTypeEnum constants.
m_vOption Variant (int) A member of the RecordsetOptionsEnum constants.
m_vLockType Variant (int) A member of the LockTypeEnum constants.

void putCacheSize(int m_nRows);

Sets the cache to a specified number of rows.

Table G.87 Argument

Argument Data Type Description
m_nRows int The number of rows to hold in the cache.

void putConnect(String m_ConnectString);

Sets the connection information for this object.

Table G.88 Argument

Argument Data Type Description
m_ConnectString String Semicolon-separated string of Connection parameters.

void putMaxRecords(int m_nMaxRecords);

Sets the maximum number of records to return in a single recordset.

Table G.89 Argument

Argument Data Type Description
m_nMaxRecords int The number of records to return.

void putName(String m_Name);

Set the name of the QueryDef object.

Table G.90 Argument

Argument Data Type Description
m_Name String Sets the name of the QueryDef.

void putPrepare(Variant m_vPrepared);

Sets the QueryDef to call either SQLPrepare or SQLExecDirect on execution.

Table G.91 Argument

Argument Data Type Description
m_vPrepared Variant (int) A member value of QueryDefStateEnum.

void putODBCTimeout(short m_sTimeout);

Table G.92 Argument

Argument Data Type Description
m_sTimeout short ODBC Timeout (in seconds).

void putReturnsRecords(Boolean m_HasRecords);

Sets the value determining if the QueryDef returns a Recordset.

(Note: Setting this to True and then using DDL won't cause a recordset to be returned.)

Table G.93 Argument

Argument Data Type Description
m_HasRecords Boolean Value denoting whether the QueryDef returns a Recordset.

void putSQL(String m_SQL);

Table G.94 Argument

Argument Data Type Description
m_SQL String SQL Statement.

The Parameters Object

Constructor Parameter = Parameters.getItem(Name) Parameter = Parameters.getItem(Index)

Methods Parameters.getDirection();

Returns the direction of the parameter, matches a value in the ParameterDirectionEnum constants.

Return Type: short

Parameters.getName();

Returns the Name of the Parameter.

Return Type: String

Parameters.getProperties();

Returns the Properties collection.

Return Type: A Properties object.

Parameters.getType();

Returns a member of the DataTypeEnum constants.

Return Type: short

Parameters.getValue();

Returns the value of the Parameter.

Return Type: A variant containing the value of the parameter.

Parameters.putDirection(short m_Direction);

Sets the direction of the Parameter.

Table G.95 Argument

Argument Data Type Description
m_Direction short A member of the ParameterDirectionEnum constants.

Parameters.putType(short m_DataType);

Sets the data type of the Parameter.

Table G.96 Argument

Argument Data Type Description
m_DataType short A member of the DataTypeEnum constants.

Parameters.putValue(Variant m_vValue);

Sets the value of the Parameter.

Table G.97 Argument

Argument Data Type Description
m_ vValue Variant The Parameter value.

The Relation Object

Constructor Relation = Database.CreateRelation()

Methods Field CreateField({Optional} Variant m_vName, { {Optional} Variant m_vDataType, Optional} Variant m_vSize);

Table G.98 Arguments

Argument Data Type Description
m_vName Variant (String) The name of the Field to be created.
m_vDataType Variant (int) A member of the DataTypeEnum constants.
m_vSize Variant (int) The size of the Field (Read/Write only for a Text field, up to 255).

int getAttributes();

Returns the attributes for this TableDef.

Return Type: int (of type TableAttributesEnum)

Fields getFields();

Returns the Fields collection for this Relation.

Return Type: A Fields object.

String getForeignTable();

Returns the name of the Foreign Table in the relation.

Return Type: String

String getName();

Returns the name for this Connection object.

Return Type: String

Boolean getPartialReplica();

Returns whether or not the Relation is enforced during synchronization.

Return Type: Boolean

Properties getProperties();

Returns the Properties collection.

Return Type: A Properties object.

String getTable();

Returns the name of the primary Table object, a QueryDef or TableDef.

Return Type: String

void putAttributes(int m_Option);

Sets the Attributes for this Relation.

Table G.99 Argument

Argument Data Type Description
m_Option int A member of the RelationAttributeEnum constants.

void putForeignTable(String m_ForeignTable);

Sets the name of the TableDef or QueryDef that will be the Foreign Table in the Relation.

Table G.100 Argument

Argument Data Type Description
m_ForeignTable String The name of a QueryDef or TableDef.

void putName(String m_Name);

Sets the Name for this Relation.

Table G.101 Argument

Argument Data Type Description
m_Name String A name.

void putPartialReplica(Boolean m_Enforce);

Determines whether or not the relation is enforced during synchronization.

Table G.102 Argument

Argument Data Type Description
m_Enforce Boolean True if the relation is to be enforced.

void putTable(String m_Table);

Sets the name of the TableDef or QueryDef object you are using.

Table G.103 Argument

Argument Data Type Description
m_Table String The name of a TableDef or QueryDef.

The Field Object

Constructor Field = Fields.getItem(Variant name)

-or-

Field = Fields.getItem(Variant index)

Methods int _30_FieldSize(); void AppendChunk(Variant m_vChunk);

Used to break up large data types during submission to the data source. Improves performance and decreases load on the network.

Table G.104 Argument

Argument Data Type Description
m_vChunk Variant The piece of data you want to send.

CreateProperty(Variant m_PropName, Variant m_vType, Variant m_vDataType, Variant m_vDDL);

Creates a new Property.

Return Type: A Property object.

Table G.105 Arguments

Argument Data Type Description
m_PropName Variant (String) The name of the new Property.
m_vType Variant (int) A member of the DataTypeEnum constants.
m_vDataType Variant The initial property value.
m_vDDL Variant (Boolean) True if this property is a Data Definition Language property.

Boolean getAllowZeroLength();

Returns whether or not the Field allows zero-length strings.

Return Type: Boolean

int getAttributes();

Returns the attributes for this Field.

Return Type: int (of type FieldAttributesEnum)

short getCollectionIndex();

Returns a short value equal to the index of this Field in the collection.

Return Type: short

Field.getCollatingOrder();

Returns the collating order for this Database.

Return Type: An int matching a value in LanguageConstants.

Boolean getDataUpdatable();

Returns true if the data in the Field is updatable.

Return Type: Boolean

Variant getDefaultValue();

Returns the default value of the Field.

Return Type: Variant

int getFieldSize();

Returns the size of the Field.

Return Type: int

String getForeignName();

Returns the name of the Field in a Foreign table that is the foreign key in the Relation.

Return Type: String

Variant GetChunk(int m_Offset, int m_Bytes);

Used to break up large data types during retrieval to improve performance and decrease load on the network.

Table G.106 Arguments

Argument Data Type Description
m_Offset int The byte offset at which to begin retrieval.
m_Bytes int The number of bytes to retrieve each time.

String getName();

Returns the name of this Field.

Return Type: String

short getOrdinalPosition();

Returns the ordinal position of this Field in the Fields collection.

Return Type: short

Variant getOriginalValue();

Returns the original value in the case of a collision during a Batch Update.

Return Type: Variant

Properties getProperties();

Returns the Properties collection for this object.

Return Type: A Properties object.

Boolean getRequired();

Returns whether or not this Field requires non-null values.

Return Type: Boolean

String getSourceTable();

Returns the name of the source table for this Field.

Return Type: String

int getSize();

Returns the size of the Field.

Return Type: int

short getType();

Returns a constant of RecordsetTypeEnum constants.

Return Type: short

Variant getValue();

Returns the value of the Field.

Return Type: Variant

Boolean getValidateOnSet();

Returns true if the Field Validation Rule is checked when the Field's value is set.

Return Type: Boolean

String getValidationText();

Returns the text of the message your application displays if the value of a Field object doesn't satisfy the validation rule (Jet Workspaces only).

Return Type: String

String getValidationRule();

Returns the update, insert, or delete constraints on the object.

Return Type: String

Variant getVisibleValue();

Returns the newest value in the case of a collision.

Return Type: Variant

void putAllowZeroLength(Boolean);

Sets the value that determines whether this field allows zero--length strings.

void putAttributes(int m_Attribute);

Sets the Attributes for this Field.

Table G.107 Argument

Argument Data Type Description
m_Attribute int A member of the FieldAttributeEnum constants.

void putForeignName(String m_Name);

Sets the name of the Foreign table in a Field Constraint.

Table G.108 Argument

Argument Data Type Description
m_Name String The name of a QueryDef or TableDef.

void putName(String m_Name);

Sets the name of this Field object.

Table G.109 Argument

Argument Data Type Description
m_Name String The name of the Field object.

void putOrdinalPosition(short m_Ordinal);

Sets the position of the Field in the Fields Collection before it is appended.

Table G.110 Argument

Argument Data Type Description
m_Ordinal short Sets the position of the Field.

void putRequired(Boolean m_ValRequired);

Table G.111 Argument

Argument Data Type Description
m_ValRequired Boolean Set to True if a value is required of this Field.

void putSize(int m_Size);

Sets the size of the Field object before it is appended.

Table G.112 Argument

Argument Data Type Description
m_Size int The size (in characters) of a text field.

void putType(short m_DataType);

Sets the data type of the Field before it is appended.

Table G.113 Argument

Argument Data Type Description
m_DataType short A member of the DataTypeEnum constants.

void putValidationRule(String m_Rule);

Sets the expression that is checked when data is updated.

Table G.114 Argument

Argument Data Type Description
m_Rule String The expression, in the form of a valid SQL WHERE clause expression.

void putValidationText(String m_ValidText);

Sets the message to use when a client activates a Validation Rule.

Table G.115 Argument

Argument Data Type Description
m_ValidText String The message seen when a validation rule is activated.

void putValue(Variant m_vValue);

Sets the Field value.

Table G.116 Argument

Argument Data Type Description
m_vValue Variant The value of the Field.

void putDefaultValue(Variant m_DefaultValue);

Table G.117 Argument

Argument Data Type Description
m_DefaultValue Variant (String) Default Value for the Field if not specified in the SQL statement.

void putValidateOnSet(Boolean m_ValidateNow);

Allows you to set whether the field is validated when the value is set, or when the Update takes place.

Table G.118 Argument

Argument Data Type Description
m_ValidateNow Boolean True, if you want to validate the fields as they are set.

The Index Object

Constructor Index = Indexes.getItem(Variant name)

-or-

Index = Indexes.getItem(Variant index)

-or-

Index = TableDef.CreateIndex(Variant fieldname)

Methods Index.

CreateField({Optional} Variant m_vName, { {Optional} Variant m_vDataType, Optional} Variant m_vSize);

Table G.119 Arguments

Argument Data Type Description
m_vName Variant (String) The name of the Field to be created.
m_vDataType Variant (int) A member of the DataTypeEnum constants.
m_vSize Variant (int) The size of the Field (Read/Write only for a Text field, up to 255).

Index.CreateProperty(Variant m_PropName, Variant m_vType, Variant m_vDataType, Variant m_vDDL);

Creates a new Property.

Return Type: A Property object.

Table G.120 Arguments

Argument Data Type Description
m_PropName Variant (String) The name of the new Property.
m_vType Variant (int) A member of the DataTypeEnum constants.
m_vDataType Variant The initial property value.
m_vDDL Variant (Boolean) True if this property is a Data Definition Language property.

Index.getClustered();

Returns True if the Index is clustered.

Return Type: Boolean

Index.getDistinctCount();

Returns the number of unique keys in the index.

Return Type: int

Index.getFields();

Returns the Fields collection for this Index.

Return Type: A Fields object.

Index.getForeign();

Returns True if the object is a foreign key.

Return Type: Boolean

Index.getIgnoreNulls();

Returns True if null values do not have an entry in the Index.

Return Type: Boolean

Index.getName();

Returns the name of the Index.

Return Type: String

Index.getProperties();

Returns the Properties collection for this object.

Return Type: A Properties object.

Index.getRequired();

Returns True if the field cannot contain null values.

Return Type: Boolean

Index.getPrimary();

Returns True if this is the primary Index.

Return Type: Boolean

Index.getUnique();

Returns True if this is a unique index.

Return Type: Boolean

Index.putClustered(Boolean m_Clustered);

Sets this index to be clustered.

Table G.121 Argument

Argument Data Type Description
m_Clustered Boolean Set to True to indicate this index is clustered.

Index.putFields(Variant);

Sets the Fields in the Index.

Table G.122 Argument

Argument Data Type Description
m_Fields Variant (String) Sets the Fields in an Index.

Index.putIgnoreNulls(Boolean m_Ignore);

Sets the property that determines whether the Index ignores null values.

Table G.123 Argument

Argument Data Type Description
m_Ignore Boolean Set to True to ignore null values in the Index.

Index.putName(String m_Name);

Sets the name of this Index.

Table G.124 Argument

Argument Data Type Description
m_Name String The name of the Index object.

Index.putPrimary(Boolean);

Sets the Primary Index.

Table G.125 Argument

Argument Data Type Description
m_Primary Boolean Set to True to make this the Primary index.

Index.putRequired(Boolean m_Required);

Set to True to require that Fields be non-null.

Table G.126 Argument

Argument Data Type Description
m_Required Boolean Determines whether null values are allowed.

Index.putUnique(Boolean m_Unique);

Sets this index to be a unique index.

Table G.127 Argument

Argument Data Type Description
m_Name String The name of the Index object.

The Group Object

Constructor

Methods User CreateUser({Optional} Variant m_vUserName, {Optional} Variant m_vPID, {Optional} Variant m_vPassword); Creates a new User.

Table G.128 Arguments

Argument Data Type Description
m_UserName Variant (String) The name of the new User.
m_vPID Variant (String) A unique identifier for this User.
m_vPassword Variant (String) A password up to 14 characters in length.

Users getUsers();

Returns the Users collection for this Group.

Return Type: A Users object.

Properties getProperties();

Returns the Properties collection for this object.

Return Type: A Properties object.

String getName();

Returns the name of the Group.

Return Type: String

void putName(String m_GroupName);

Sets the name of the Group.

Table G.129 Argument

Argument Data Type Description
m_GroupName String The name of a group.

void putPID(String m_PID);

Sets the PID of the Group.

Table G.130 Argument

Argument Data Type Description
m_PID String A 4- to 20-character long sequence of alphanumeric characters.

The User Object

Constructor User = Users.getItem(Variant name) -or-

User = Users.getItem(Variant index)

-or-

User = Database.CreateUser()

Methods Group CreateGroup(Variant m_GroupName, Variant m_PID); Creates a new Group.

Return Type: A Group object.

Table G.131 Arguments

Argument Data Type Description
m_GroupName Variant (String) The name for the new Group.
m_PID Variant (String) The unique ID for the Group.

void NewPassword(String m_OldPassword, String m_NewPassword);

Creates a new password for the User object.

Table G.132 Arguments

Argument Data Type Description
m_OldPassword String The old password.
m_NewPassword String The new password.

Properties getProperties();

Returns the Properties collection for this object.

Return Type: A Properties object.

String getName();

Returns the name of the User object.

Return Type: String

void putName(String m_UserName);

Sets the name for a User.

Table G.133 Argument

Argument Data Type Description
m_UserName String The user name.

void putPassword(String m_Password);

Sets the password for the User.

Table G.134 Argument

Argument Data Type Description
m_Password String An alphanumeric string up to 14 characters long.

void putPID(String m_PID);

Sets the PID of the User.

Table G.135 Argument

Argument Data Type Description
m_PID String A 4- to 20-character long sequence of alphanumeric characters.

The Container Object

Constructor Container = Containers.getItem(Variant name) -or-

Container = Containers.getItem(Variant index)

Methods Container.getAllPermissions(); Returns the sum of the permissions on the Container (matching members of the PermissionsEnum constants) including the inherited permissions.

Return Type: int

Container.getDocuments();

Returns the Documents collection for this Container.

Return Type: String

Container.getInherit();

Returns True if the Documents placed into this Container will inherit permissions from this Container.

Return Type: Boolean

Container.getName();

Returns the name of the Container.

Return Type: String

Container.getOwner();

Returns the name of a User object that is set as the owner of this Container.

Return Type: String

Container.getPermissions();

Returns the sum of the permissions on the Container (matching members of the PermissionsEnum constants) excluding inherited permissions.

Return Type: int

Container.getProperties();

Returns the Properties collection for this object.

Return Type: A Properties object

Container.getUserName();

Returns the user account with permissions on this object.

Return Type: String

Container.putInherit(Boolean m_Inherit);

If True, causes all Documents created in this Container to inherit its permissions.

Table G.136 Argument

Argument Data Type Description
m_Inherit Boolean True--Inherit permissions, False--do not.

Container.putOwner(String m_UserName);

Sets the User account that has ownership of this object.

Table G.137 Argument

Argument Data Type Description
m_UserName String The name of a User object.

Container.putPermissions(int m_Permissions);

Sets the permissions for this Container.

Table G.138 Argument

Argument Data Type Description
m_Permissions int A member of the PermissionEnum constants.

Container.putUserName(String m_User);

Sets the user account for this container.

Table G.139 Argument

Argument Data Type Description
m_User String A user account.

The Property Object

Constructor

Property = Database.CreateProperty(name, data type, value, DDL)

Property = Document.CreateProperty(name, data type, value, DDL)

Property = Field.CreateProperty(name, data type, value, DDL)

Property = Index.CreateProperty(name, data type, value, DDL)

Property = QueryDef.CreateProperty(name, data type, value, DDL)

Property = TableDef.CreateProperty(name, data type, value, DDL)

Property = Properties.getItem(name)

Property = Properties.getItem(index)

Methods

Property.getInherited(); Returns whether or not this property is inherited.

Return Type: Boolean

Property.getName();

Returns the name of the property.

Return Type: String

Property.getProperties();

Returns the Properties collection.

Return Type: String

Property.getType();

Returns a PropertTypeEnum value.

Return Type: int

Property.getValue();

Returns the value of a property.

Return Type: Variant

Property.putName(String);

Sets the name for the Property.

Table G.140 Argument

Argument Data Type Description
m_Name String A name.

Property.putType(short m_DataType);

Sets the data type of the property.

Table G.141 Argument

Argument Data Type Description
m_DataType short A member of the DataTypeEnum constants.

Property.putValue(Variant m_vValue);

Sets the Property value.

Table G.142 Argument

Argument Data Type Description
m_vValue Variant The value of the Property.

The Document Object

Constructor Document = Documents.getItem(name) Document = Documents.getItem(index)

Methods Document.CreateProperty(Variant m_PropName, Variant m_vType, Variant m_vDataType, Variant m_vDDL);

Creates a new Property.

Return Type: A Property object.

Table G.143 Arguments

Argument Data Type Description
m_PropName Variant (String) The name of the new Property.
m_vType Variant (int) A member of the DataTypeEnum constants.
m_vDataType Variant The initial property value.
m_vDDL Variant (Boolean) True if this property is a Data Definition Language property.

Document.getAllPermissions();

Returns an int that is the sum of all of the PermissionsEnum constants representing the permissions on this object.

Return Type: int

Document.getContainer();

Returns: String with the name of the Container object associated with this Document.

Return Type: String

Document.getDateCreated();

Returns the date this Document was created.

Return Type: Variant

Document.getLastUpdated();

Retunrs the last date the Document was updated.

Return Type: Variant

Document.getName();

Returns the name of the Document.

Return Type: String

Document.getOwner();

Returns: A String with the name of a user account that is the Owner of this object.

Return Type: String

Document.getPermissions();

Returns the sum of the permissions on the Container (matching members of the PermissionsEnum constants) excluding inherited permissions.

Return Type: int

Document.getProperties();

Returns the Properties collection for this object.

Return Type: A Properties object

Document.getUserName()

Returns:

Return Type: String

Document.putPermissions(int m_Permissions);

Sets the permissions for an object.

Table G.144 Argument

Argument Data Type Description
m_Permissions int A member (or sum) of the PermissionsEnum constants.

Document.putOwner(String m_Owner);

Sets the user account who has ownership of this object.

Table G.145 Argument

Argument Data Type Description
m_Owner String A user account.

Collections in DAO - Part One

Table G.146 Methods Supported by These Collections

Method Argument List Description
Delete None Deletes the collection member.
Append (Object) Appends the object to the collection.
getItem (Variant) Returns the collection member at the specified index.
getCount None Returns the number of members in the collection.
_NewEnum None
Refresh None Enumerates the members of the collection.

DAO Collections - Part Two

Table G.147 Methods Supported by These Collections

Method Argument List Description
getItem (Variant) Returns the collection member at the specified index.
getCount None Returns the number of members in the collection.
_NewEnum None
Refresh None Enumerates the members of the collection.

_DynaCollection

Table G.148 Methods Supported by These Collections

Method Argument List Description
Delete None Deletes the collection member.
Append (Object) Appends the object to the collection.
getCount None Returns the number of members in the collection.
_NewEnum None
Refresh None Enumerates the members of the collection.

_Collection

Table G.149 Methods Supported by These Collections

Method Argument List Description
getCount None Returns the number of members in the collection.
_NewEnum None
Refresh None Enumerates the members of the collection.

Constants

Java Package: com.ms.com

_DAOSuppHelp

int LogMessages; int KeepLocal;

int Replicable;

int ReplicableBool;

int V1xNullBehavior;

CollatingOrderEnum

int dbSortNeutral; int dbSortArabic;

int dbSortCyrillic;

int dbSortCzech;

int dbSortDutch;

int dbSortGeneral;

int dbSortGreek;

int dbSortHebrew;

int dbSortHungarian;

int dbSortIcelandic;

int dbSortNorwdan;

int dbSortPDXIntl;

int dbSortPDXNor;

int dbSortPDXSwe;

int dbSortPolish;

int dbSortSpanish;

int dbSortSwedFin;

int dbSortTurkish;

int dbSortJapanese;

int dbSortChineseSimplified;

int dbSortChineseTraditional;

int dbSortKorean;

int dbSortThai;

int dbSortSlovenian;

int dbSortUndefined;

CursorDriverEnum

int dbUseDefaultCursor; int dbUseODBCCursor;

int dbUseServerCursor;

int dbUseClientBatchCursor;

int dbUseNoCursor;

DatabaseTypeEnum

int dbVersion10; int dbEncrypt;

int dbDecrypt;

int dbVersion11;

int dbVersion20;

int dbVersion30;

DataTypeEnum

int dbBoolean; int dbByte;

int dbInteger;

int dbLong;

int dbCurrency;

int dbSingle;

int dbDouble;

int dbDate;

int dbBinary;

int dbText;

int dbLongBinary;

int dbMemo;

int dbGUID;

int dbBigInt;

int dbVarBinary;

int dbChar;

int dbNumeric;

int dbDecimal;

int dbFloat;

int dbTime;

int dbTimeStamp;

DriverPromptEnum

int dbDriverPrompt; int dbDriverNoPrompt;

int dbDriverComplete;

int dbDriverCompleteRequired;

EditModeEnum

int dbEditNone; int dbEditInProgress;

int dbEditAdd;

int dbEditChanged;

int dbEditDeleted;

int dbEditNew;

FieldAttributeEnum

int dbFixedField;

int dbVariableField;

int dbAutoIncrField;

int dbUpdatableField;

int dbSystemField;

int dbHyperlinkField;

int dbDescending;

IdleEnum

int dbFreeLocks; int dbRefreshCache;

LanguageConstants

Generic dbLangArabic;

Generic dbLangCzech;

Generic dbLangDutch;

Generic dbLangGeneral;

Generic dbLangGreek;

Generic dbLangHebrew;

Generic dbLangHungarian;

Generic dbLangIcelandic;

Generic dbLangNordic;

Generic dbLangNorwDan;

Generic dbLangPolish;

Generic dbLangCyrillic;

Generic dbLangSpanish;

Generic dbLangSwedFin;

Generic dbLangTurkish;

Generic dbLangJapanese;

Generic dbLangChineseSimplified;

Generic dbLangChineseTraditional;

Generic dbLangKorean;

Generic dbLangThai;

Generic dbLangSlovenian;

LockTypeEnum

int dbPessimistic; int dbOptimistic;

int dbOptimisticValue;

int dbOptimisticBatch;

ParameterDirectionEnum

int dbParamInput; int dbParamOutput;

int dbParamInputOutput;

int dbParamReturnValue;

PermissionEnum

int dbSecNoAccess; int dbSecFullAccess;

int dbSecDelete;

int dbSecReadSec;

int dbSecWriteSec;

int dbSecWriteOwner;

int dbSecDBCreate;

int dbSecDBOpen;

int dbSecDBExclusive;

int dbSecDBAdmin;

int dbSecCreate;

int dbSecReadDef;

int dbSecWriteDef;

int dbSecRetrieveData;

int dbSecInsertData;

int dbSecReplaceData;

int dbSecDeleteData;

QueryDefStateEnum

int dbQPrepare; int dbQUnprepare;

QueryDefTypeEnum

int dbQSelect; int dbQProcedure;

int dbQAction;

int dbQCrosstab;

int dbQDelete;

int dbQUpdate;

int dbQAppend;

int dbQMakeTable;

int dbQDDL;

int dbQSQLPassThrough;

int dbQSetOperation;

int dbQSPTBulk;

int dbQCompound;

RecordsetOptionEnum

int dbDenyWrite; int dbDenyRead;

int dbReadOnly;

int dbAppendOnly;

int dbInconsistent;

int dbConsistent;

int dbSQLPassThrough;

int dbFailOnError;

int dbForwardOnly;

int dbSeeChanges;

int dbRunAsync;

int dbExecDirect;

RecordsetTypeEnum

int dbOpenTable; int dbOpenDynaset;

int dbOpenSnapshot;

int dbOpenForwardOnly;

int dbOpenDynamic;

RecordStatusEnum

int dbRecordUnmodified; int dbRecordModified;

int dbRecordNew;

int dbRecordDeleted;

int dbRecordDBDeleted;

RelationAttributeEnum

int dbRelationUnique; int dbRelationDontEnforce;

int dbRelationInherited;

int dbRelationUpdateCascade;

int dbRelationDeleteCascade;

int dbRelationLeft;

int dbRelationRight;

ReplicaTypeEnum

int dbRepMakeReadOnly; int dbRepMakePartial;

SetOptionEnum

int dbPageTimeout;

int dbLockRetry;

int dbMaxBufferSize;

int dbUserCommitSync;

int dbImplicitCommitSync;

int dbExclusiveAsyncDelay;

int dbSharedAsyncDelay;

int dbMaxLocksPerFile;

int dbLockDelay;

int dbRecycleLVs;

int dbFlushTransactionTimeout;

SynchronizeTypeEnum

int dbRepExportChanges; int dbRepImportChanges;

int dbRepImpExpChanges;

int dbRepSyncInternet;

TableDefAttributeEnum

int dbAttachExclusive;

int dbAttachSavePWD;

int dbSystemObject;

int dbAttachedTable;

int dbAttachedODBC;

int dbHiddenObject;

UpdateCriteriaEnum

int dbCriteriaKey;

int dbCriteriaModValues;

int dbCriteriaAllCols;

int dbCriteriaTimestamp;

int dbCriteriaDeleteInsert;

int dbCriteriaUpdate;

UpdateTypeEnum

int dbUpdateBatch;

int dbUpdateRegular;

int dbUpdateCurrentRecord;

WorkspaceTypeEnum

int dbUseODBC; int dbUseJet;

Obsolete Features Still Supported


Previous chapterNext chapterContents


Macmillan Computer Publishing USA

© Copyright, Macmillan Computer Publishing. All rights reserved.