DAO Topics
<<Back
Next>>

DBEngine Object


DBEngine object is the top-level object in the DAO class hierarchy.


DBEngine Objects, Properties, and Methods


DBEngine Properties
Properties Description
DefaultUser Sets the username used to create the default Workspace when it is initialized.
DefaultPassword Sets the password used to create the default Workspace when it is initialized.
IniPath Sets or returns information about the Windows Registry key that contains values for the Microsoft Jet Database Engine.
LoginTimeout Sets or returns the number of seconds before an error occurs when you log on to an ODBC database.
Version Returns the version of DAO currently in use.
SystemDB Sets or returns the path for the current location of the workgroup information file.
DefaultType Sets or returns a value that indicates what type of workspace will be used by the next Workspace object created.



DBEngine Methods
Methods Description
Compact Database() Compacts the specified database
CreateDatabase() Creates a new Database object, saves the database to disk and returns an opened Database object
CreateWorkspace() Creates a new Workspace object.
Idle() Suspends data processing, enables the Microsoft Jet Database Engine to complete any pending tasks, such as memory optimization or page timeouts.
OpenDatabase() Opens a specified database in a Workspace object and returns a reference to the Database object that represents it.
RegisterDatabase() Enters connection information for an ODBC data source in the Windows Registry. The ODBC driver needs connection information when the ODBC data source is opened during the session.
SetOption() Temporarily overrides values for the Microsoft Jet Database Engine keys in the Windows Registry.
OpenConnection() Opens a Connection object on an ODBC data source.



Documents Object


A Documents collection contains all the Document objects for a specific type of object. The Documents object has one property, Count, which returns the number of objects in a collection. The Documents object has one method, Refresh(), whose syntax is Refresh, with no parameters. This method updates the objects in a collection to reflect the current database's schema.


Document Object


A Document object includes information about one instance of an object. The object can be a database, saved table, query, or relationship. The Document object has one method, CreateProperty(), which creates a new user-defined Property object. It has the following syntax:

Set property = object.CreateProperty_
(name, type, value, DDL)
The property parameter is an object variable that represents the Property object that you want to create. The object parameter is an object that you want to use to create the new Property object. The name parameter is a String that uniquely names the new Property object. The type parameter is a constant that defines the data type of the new Property object. The value parameter is a Variant containing the initial property value. The DDL parameter is a boolean that indicates whether the property is a DDL object.


Document Object Properties
Property Description
Container Returns the name of the Container object to which a Document belong.
AllPermissions Returns all the permission that apply to the current UserName property of the Container or Document object, including permissions that are specific to the user, as well as the permissions that the user inherits from memberships in groups.
DateCreated Returns the date and time that an object was created, or the date and time that a base table was created if the object is a table-type Recordset object.
Name Sets or returns a user-defined name for a DAO object. For an object not appended to a collection, this property is read/write.
Permissions Sets or returns a value that establishes the permissions for the user or group identified by the UserName property of a Container or Document object.
Owner Sets or returns a value that specifies the owner of the object.
UserName Sets or returns a value that represents a user, a group of users, or the owner of the Workspace object.
Replicable Sets or returns a value that determines whether a database or an object in a database is replicated.
KeepLocal Sets or returns a value on a table, query, form, report, macro, or module that you do not want to replicate when the database is replicated.





<<Back
top
Next>>





Copyright� 2000 by Noel