Syntax and Parameters





AddNew()

AddNew





Append()

collection.Append object

where:

collection is an object variable that represents any collection that can accept new objects.
object is an object variable that represents the object being appended, which must be of the same type as the elements of collection.



AppendChunk()

recordset.field.AppendChunk source

where:

recordset is an object variable that represents the Recordset object containing the Fields collection.
field is an object variable that represents the name of a Field object.
source is a String expression or variable containing the data that you want to append to the Field object specified by the field.



BeginTrans()

BeginTrans





Cancel()

Cancel




CancelUpdate()

recordset.CancelUpdate type

where:

recordset is an object variable that represents the Recordset which you are canceling pending updates.
type is a constant indicating the type of update; if set to dbUpdateRegular, cancels pending changes that aren't cached; if set to dbUpdateBatch, cancels pending changes in the update cache.



Clone()

Set duplicate = original.Clone

where:

duplicate is an object variable identifying the duplicate Recordset object that you're creating.
original is an object variable identifying the Recordset object that you want to duplicate.



Close()

Object.Close




CommitTrans()

CommitTrans





CompactDatabase()

DBEngine.CompactDatabase olddb, newdb, locale,_
options, password


where:

olddb is a String that identifies an existing closed database.
newdb is a String that is the file name (and path) of the compacted database that you are creating.
locale is a Variant that is a string expression that specifies a collating order for creating newdb, as specified in Settings. If you omit this argument, the locale of newdb is the same as olddb.
options is a constant or combination of constants that indicates one or more options.



CopyQueryDef()

Set querydef = recordset.CopyQueryDef

where:

querydef is an object variable that represents the copy of the QueryDef object that you want to create.
recordset is an object variable that represents the Recordset object created with the original QueryDef object.



CreateDatabase()

Set database = Workspace.CreateDatabase(name,_
locale, options)


where:

database is an object variable that represents the Database object that you want to create.
Workspace is an object variable that represents an existing Workspace object that contains the database.
name is a String, up to 255 characters long, that is the name of the database file that you are creating. It can be the full path and the filename.
locale is a string expression that specifies a collating order for creating the database.
options is a constant or combination of constants that indicates one or more options.



CreateField()

Set field = object.CreateField_
(name, type, size)


where:

field is an object variable that represents the Field object that you want to create.
object is an object variable that represents an Index, Relation, or TableDef object for which you want to create the new Field object.
name is a Variant (String subtype) that uniquely names the new Field object.
type is a constant that determines the data type of the new Field object.
size is a Variant that indicates the maximum size, in bytes, of a Field object that contains text.



CreateGroup()

Set group = object.CreateGroup(name, pid)

where:

group is an object variable that represents the Group that you want to create.
object is an object variable that represents the User or Workspace object for which you want to create the new Group object.
name is a Variant (String subtype) that uniquely names the new Group object.
pid is a Variant (String subtype) containing the PID of a group account. The identifier must contain from 4 to 20 alphanumeric characters.



CreateIndex()

Set index = tabledef.CreateIndex(name)

where:

index is an object variable that represents the index that you want to create.
tableDef is an object variable that represents the TableDef object that you want to use to create the new Index object.
name is a Variant (String subtype) that uniquely names the new Index object.



CreateProperty()

Set property = object.CreateProperty_
(name, type, value, DDL)


where:

property is an object variable that represents the Property object that you want to create.
object is an object variable that represents the Database, Field, Index, QueryDef, Document, or TableDef object you want to use to create the new Property object.
name is a String that uniquely names the new Property object.
type is a constant that defines the data type of the new Property object.
value is a Variant containing the initial property value.
DDL is a boolean that indicates whether the Property is a DDL object.



CreateQueryDef()

Set querydef = object.CreateQueryDef(name,_
sqltext)


where:

querydef is an object variable that represents the QueryDef object that you want to create.
object is an open Connection or Database object that will contain the new QueryDef.
name uniquely names the new QueryDef.
sqltext is an SQL statement defining the QueryDef.



CreateRelation()

Set relation = database.CreateRelation(name,_
table, foreigntable, attributes)


where:

relation is an object variable that represents the Relation object that you want to create.
database is an object variable that represents the Database object for which you want to create the new Relation object.
name is a String that uniquely names the new Relation object.
Table is a String that names the primary table in the relation.
Foreigntable is a String that names the foreign table in the relation.
attributes is a constant or combination of constants that contains information about the relationship type.



CreateTableDef()

Set tabledef = database.CreateTableDef_
(name, attributes, source, connect)


where:

tabledef is an object variable that represents the TableDef object that you want to create.
database is an object variable that represents the Database object that you want to create the new TableDef object.
name is a String that uniquely names the new TableDef object.
attributes is a constant or combination of constants that indicates one or more characteristics of the new TableDef object.
source is a String containing the name of a table in an external database.
connect is a String containing information about the source of an open database.



CreateUser()

Set user = object.CreateUser_
(name, pid, password)


where:

user is an object variable that represents the User object that you want to create.
object is an object variable that represents the Group or Workspace object for which you want to create the new User object.
name is a String that uniquely names the new User object.
pid is a String containing the PID of a user account.
password is a String containing the password for the new User object.



CreateWorkspace()

Set workspace = CreateWorkspace_
(name, user, password, type)


where:

workspace is an object variable that represents the Workspace object that you want to create.
name is a String that uniquely names the new Workspace object.
user is a String that identifies the owner of the new Workspace object.
password is a String containing the password for the new Workspace object. The password can be up to 14 characters long and can include any characters except ASCII character 0 (null).



Delete()

collection.Delete objectname

where:

collection is an object variable that represents a collection from which you are deleting objectname.
objectname is a String that is the Name property setting of an object in collection.



Edit()

Edit





Execute()

object.Execute source, options

where:

object is a Connection or Database object variable on which the query will run.
source is an SQL statement or the Name property value of a QueryDef object.
options is a constant or combination of constants that determines the data integrity characteristics of the query.



FillCache()

recordset.FillCache rows, startbookmark

where:

recordset is an object variable that represents the Recordset object created from an ODBC data source.
Rows is an integer that specifies the number of rows to store in the cache.
startbookmark is a String that specifies a bookmark.



FindFirst()

FindFirst





FindLast()

FindLast





FindNext()

FindNext





FindPrevious()

FindPrevious





GetChunk

Set variable = recordset.field.GetChunk (offset, numbytes)

where:

variable is a String that receives the data from the Field object named by field.
recordset is an object variable that represents the Recordset object containing the Field collection.
field is an object variable that represents a Field object.
Offset is a long value equal to the number of bytes to skip before copying begins.
numbytes is a long value equal to the number of bytes you want to return.



GetRows()

Set varArray = recordset.GetRows_
(numrows)


where:

varArray is a Variant that stores the returned data.
recordset is an object variable that represents a Recordset object.
NumRows is a Variant that is equal to the number of rows to retrieve.



Idle()

DBEngine.Idle





MakeReplica()

database.MakeReplica replica, description, options

where:

database is an object variable that represents an existing Database that is a replica.
replica is a String that is the path and filename of the new replica.
description is a String that describes the replica that you are creating.
options is a constant or combination of constants that specifies characteristics of the replica that you are creating.



Move()

recordset.Move rows, startbookmark

where:

recordset is an object variable that represents the Recordset object whose current record position is being moved.
rows is a signed Long value that specifies the number of rows the position will move. If rows is greater than zero, the position is moved forward (toward the end of the file). If the rows is less than zero, the position is moved backward (toward the beginning of the file).
startbookmark is a Variant (String subtype) value identifying a bookmark. If you specify startbookmark, Move begins relative to this bookmark. Otherwise, Move begins from the current record.



MoveFirst()

MoveFirst





MoveLast()

MoveLast





MoveNext()

MoveNext





MovePrvious()

MovePrevious





NewPassword()

object.NewPassword oldpassword, newpassword

where:

object is an object variable that represents the User object or a Microsoft Jet 3.x Database object whose Password property you want to change.
oldpassword is a String that is the current setting of the Password property of the User or Jet 3.x Database object.
newpassword is a String that is the new setting of the Password property of the User or Jet 3.x Database object.



NextRecordset()

NextRecordset





OpenConnection

Set connection = Workspace.OpenConnection(name,_
options, read-only, connect)


where:

connection is a Connection object variable to which the new connection will be assigned.
workspace is a variable of Workspace data type that references the existing Workspace object that will contain the new connection.
name is a string expression.
options is a Variant that sets various options for the connection.
read-only is a boolean value that is True if the connection is to be opened for read-only.
connect is an ODBC connect string.



OpenDatabase()

Set database = Workspace.OpenDatabase(dbname,_
options, read-only, connect)


where:

database is an object variable that represents the Database object that you want to open.
Workspace is an object variable that represents an existing Workspace object that will contain the database.
dbname is a String that is the name of an existing Microsoft Jet database file, or the data source name (DSN) of an ODBC data source.
options is a variant that sets various options for the database.
read-only is a boolean value that is True if you want to open the database with read-only access.
connect is a String that specifies connection information, including passwords.



OpenRecordSet()

Set recordset = object.OpenRecordSet_
(source, type, options, lockedits)


where:

recordset is an object variable that represents the RecordSet object that you want to open.
object is an object variable that represents an existing object from which you want to create the new RecordSet.
source is a string specifying the source of the records for the new RecordSet.
type is a constant that indicates the type of Recordset to open.
lockedits is a constant that determines the locking for the Recordset.



PopulatePartial()

database.PopulatePartial dbname

where:

database is an object variable that references the partial replica Database object that you want to populate.
dbname is a String specifying the path and name of the full replica from which to populate records.



Refresh()

Refresh




RefreshLink()

RefreshLink




RegisterDatabase()

DBEngine.RegisterDatabase dbname,_
driver, silent, attributes


where:

dbname is a String that is the name used in the OpenDatabase() method. It refers to the block of descriptive information about the data source.
driver is a String that is the name of the ODBC driver.
Silent is a boolean that is True if you don't want to display the ODBC driver dialog boxes that prompt for driver-specific information; or False if you want to display the ODBC driver dialog boxes.
attributes is a String that is a list of keywords to be added to the Windows Registry. The keywords are in a carriage-return-delimited string.



Requery()

recordset.Requery newquerydef

where:

recordset is an object variable that represents an existing Microsoft Jet dynaset-, snapshot, or forward-only-type Recordset object, for an ODBCDirect Recordset object.
newquerydef is a Variant that represents the Name property value of a QueryDef object.



Rollback()

Rollback





Seek()

recordset.seek comparison key1, key2...key13

where:

recordset is an object that represents an existing table-type Recordset object that has defined index, as specified by the Recordset object's Index property.
comparison is one of the following string expressions: <, <=, =, =>, or >.
key1, key2...key13 is one or more values corresponding to fields in the Recordset object's current index, as specified by its Index property setting. You can use up to 13 key arguments.



SetOption()

DBEngine.SetOption parameter, newvalue

where:

parameter is a Long constant.
newvalue is a Variant value that you want to set parameter to.



Synchronize()

database.Synchronize pathname, exchange

where:

database is an object variable that represents a Database object that is a replica.
pathname is a String that contains the path to the target replica with which the database will be synchronized.
exchange is a constant indicating which direction to synchronize changes between the two databases.



Update()

recordset.Update (type, force)

where:

recordset is an object variable that represents an open, updatable Recordset object.
type is a constant indicating the type of update.
force is a boolean value indicating whether to force the changes into the database.