Visual Basic 6 Database How-To

Previous chapterNext chapterContents


- C -
REMOTE DATA OBJECT REFERENCE



The remote data object (RDO) model provides you with an object-oriented interface to open database connectivity (ODBC) datasources. Figure C.1 shows the entire RDO object model in its hierarchical form.

This appendix is designed as a reference to all the objects included in the RDO object model. The collections and objects are listed in alphabetical order with tables indicating and describing all the available methods and properties available to each.

rdoColumns Collection, rdoColumn Object

The rdoColumns collection contains all the columns in a rdoResultset or rdoTable. Table C.1 shows the method for the rdoColumns collection, and Table C.2 lists the properties for the rdoColumns collection. Table C.3 lists the events, Table C.4 lists the methods, and Table C.5 lists the properties for the rdoColumn object.

Figure C.1. The remote data object model.

Table C.1. rdoColumns collection method.

METHOD DESCRIPTION
Refresh Updates the contents of the collection to reflect the current status of the database

Table C.2. rdoColumns collection properties.

PROPERTY DESCRIPTION
Count The number of objects in the collection
Item Returns the specified object from the collection

Table C.3. rdoColumn object events.

EVENT DESCRIPTION
DataChanged Fired when a column's data changes
WillChangeData Fired before a column's data is changed

Table C.4. rdoColumn object methods.

METHOD DESCRIPTION
AppendChunk Appends data to an rdoColumn
ColumnSize The number of bytes in an rdoColumn's value
GetChunk Returns a portion of an rdoColumn's value

Table C.5. rdoColumn object properties.

PROPERTY DESCRIPTION
AllowZeroLength Indicates whether a zero-length string is acceptable in the Value property
Attributes Returns attributes of an rdoColumn
BatchConflictValue Returns the value currently in the database during an optimistic batch update conflict
ChunkRequired Indicates that GetChunk and AppendChunk must be used with this rdoColumn
KeyColumn Returns or sets whether this column is part of the primary key
Name Returns the name of the remote data object
OrdinalPosition Returns the relative position in the collection
OriginalValue Returns the value of a column when it was fetched from the database
Required Indicates whether a column requires a non-NULL value
Size Returns the size of an rdoColumn
SourceColumn Returns the object's original source column name
SourceTable Returns the object's original source table name
Status Returns or sets the column buffer state
Type Returns the data type of the object
Updatable Indicates whether changes can be made to the object
Value Returns or sets the value of the object when ChunkRequired is False

rdoConnections Collection, rdoConnection Object

The rdoConnections collection manages all the connections in an rdoEnvironment. Table C.6 lists the methods and Table C.7 lists the properties of the rdoConnections collection. Table C.8 lists the events, Table C.9 lists the methods, and Table C.10 lists the properties of the rdoConnection object.

Table C.6. rdoConnections collection methods.

METHOD DESCRIPTION
Add Adds an item to the collection
Remove Removes an item from the collection

Table C.7. rdoConnections collection properties.

PROPERTY DESCRIPTION
Count The number of objects in the collection
Item Returns the specified object from the collection

Table C.8. rdoConnection object events.

EVENT DESCRIPTION
BeforeConnect Fired before the ODBC call to SQLDriverConnect
Connect Fired after the connection is made to the ODBC datasource
Disconnect Fired after a connection has been closed
QueryComplete Fired after an asynchronous query is completed
QueryTimeout Fired after a query has exceeded the QueryTimeout property
WillExecute Fired before a query is executed

Table C.9. rdoConnection object methods.

METHOD DESCRIPTION
BeginTrans Begins a transaction
Cancel Cancels an asynchronous query or pending results
Close Closes the connection
CommitTrans Commits a transaction
EstablishConnection Connects to a datasource
Execute Executes a query
OpenResultset Creates a new rdoResultset
RollbackTrans Rolls back a transaction

Table C.10. rdoConnection object properties.

PROPERTY DESCRIPTION
AsyncCheckInterval Keeps track of how often checks are done on asynchronous queries
Connect Returns information about the open connection
CursorDriver Returns or sets where the cursor is to be created
hDbc The ODBC connection handle for use with the ODBC API
LastQueryResults The last resultset returned on a prepared statement
LoginTimeout Returns or sets the login timeout, measured in seconds
LogMessages Returns or sets the ODBC trace file pathname
Name The name of the object
QueryTimeout Returns or sets the query timeout
rdoQueries The prepared statements collection
rdoResultsets The result sets collection
rdoTables The tables collection
RowsAffected The number of rows affected by the last query
StillConnecting Indicates a connection is still attempting to connect
StillExecuting Indicates an asynchronous query is still executing
Transactions Indicates whether a cursor supports transactions
Updatable Indicates whether a cursor is updatable
Version Returns the version of the ODBC driver

rdoEngine Object

The rdoEngine is the parent object of the RDO object model. It does not need to be created. Table C.11 shows the event of the rdoEngine object. Table C.12 lists the methods of the rdoEngine, and Table C.13 lists its properties.

Table C.11. rdoEngine object event.

EVENT DESCRIPTION
InfoMessage Fired when an rdoError is added to the rdoErrors collection

Table C.12. rdoEngine object methods.

METHOD DESCRIPTION
rdoCreateEnvironment Creates a new rdoEnvironment
rdoRegisterDataSource Registers a new ODBC datasource

Table C.13. rdoEngine object properties.

PROPERTY DESCRIPTION
rdoDefaultCursorDriver Returns or sets the default of where cursors are created for connections
RdoDefaultErrorThreshold Returns or sets the default error threshold
rdoDefaultLoginTimeout Returns or sets the timeout value for connecting to a datasource
rdoDefaultPassword Returns or sets the default password for any new rdoEnvironment
rdoDefaultUser Returns or sets the default user for any new rdoEnvironment
rdoEnvironments The collection of all the active rdoEnvironments
rdoErrors The collection of all the rdoErrors
rdoLocaleID The locale ID used for loading resources
rdoVersion The version of the RDO library

rdoEnvironments Collection, rdoEnvironment Object

The rdoEnvironment is a grouping of connections for a particular user. The rdoEnvironments collection is the collection of all those rdoEnviroment objects. Table C.14 lists the methods and Table C.15 lists the properties for the rdoEnvironments collection. Table C.16 lists the events, Table C.17 lists the methods, and Table C.18 lists the properties for the rdoEnvironment object.

Table C.14. rdoEnvironments collection methods.

METHOD DESCRIPTION
Add Adds an item to the collection

Remove Removes an item from the collection

Table C.15. rdoEnvironments collection properties.

PROPERTY DESCRIPTION
Count The number of objects in the collection
Item Returns the specified object from the collection

Table C.16. rdoEnvironment object events.

EVENT DESCRIPTION
BeginTrans Fired after the BeginTrans method is completed
CommitTrans Fired after the CommitTrans method is completed
RollbackTrans Fired after the RollbackTrans method is completed

Table C.17. rdoEnvironment object methods.

METHOD DESCRIPTION
BeginTrans Begins a transaction
Close Closes the object
CommitTrans Commits a transaction
OpenConnection Adds an item to the rdoConnections collection
RollbackTrans Rolls back a transaction

Table C.18. rdoEnvironment object properties.

PROPERTY DESCRIPTION
CursorDriver Returns or sets where cursors are created
hEnv Returns the handle to the ODBC environment
LoginTimeout Returns or sets the login timeout
Name Returns the name of the object
Password Returns or sets the password
rdoConnections The collection of rdoConnections in this environment
UserName Returns or sets the username

rdoErrors Collection, rdoError Object

The rdoErrors collection manages errors returned by RDO operations. For each operation there might be multiple rdoError objects. Table C.19 shows the method of the rdoErrors collection, Table C.20 lists the properties of the rdoErrors collection, and Table C.21 lists the properties of the rdoError object.

Table C.19. rdoErrors collection method.

METHOD DESCRIPTION
Clear Clears the collection

Table C.20. rdoErrors collection properties.

PROPERTY DESCRIPTION
Count The number of objects in the collection
Item Returns the specified object from the collection

Table C.21. rdoError object properties.

PROPERTY DESCRIPTION
Description Returns the description of the error
HelpContext Returns a help context ID associated with the error
HelpFile Returns a help file associated with the error
Number Returns the error number
Source Returns the source of the error
SQLRetcode Returns the return value from the most recent RDO operation

SQLState Returns the type of error as specified by the X/Open and SQL Access Group SQL

rdoParameters Collection, rdoParameter Object

The rdoParameters collection manages the list of rdoParameter objects for an rdoQuery. Table C.22 lists the properties for the rdoParameters collection. Table C.23 shows the method and Table C.24 lists the properties for the rdoParameter object.

Table C.22. rdoParameters collection properties.

PROPERTY DESCRIPTION
Count The number of objects in the collection
Item Returns the specified object from the collection

Table C.23. rdoParameter object method.

METHOD DESCRIPTION
AppendChunk Appends data to the object's data property

Table C.24. rdoParameter object properties.

PROPERTY DESCRIPTION
Direction Returns or sets how a parameter is passed to or from a procedure
Name Returns or sets the name of the object
Size Returns or sets the size of the object
Type Returns or sets the data type of the object
Value Returns or sets the value of the object

rdoQueries Collection, rdoQuery Object

An rdoQuery object is used to manage Structured Query Language (SQL) queries where there are input or output parameters. The rdoQueries collection is made up of the rdoQuery objects for an rdoConnection. Table C.25 lists the properties for the rdoQueries collection. Table C.26 lists the methods and Table C.27 lists the properties for the rdoQuery object.

Table C.25. rdoQueries collection properties.

PROPERTY DESCRIPTION
Count The number of objects in the collection
Item Returns the specified object from the collection

Table C.26. rdoQuery object methods.

METHOD DESCRIPTION
Cancel Cancels an asynchronous query or pending result
Close Closes the object
Execute Executes the query
OpenResultset Creates a new rdoResultset

Table C.27. rdoQuery object properties.

PROPERTY DESCRIPTION
ActiveConnection Returns a reference to the parent rdoConnection
BindThreshold Returns or sets the size of the largest column automatically bound under ODBC
CursorType Returns or sets the type of cursor
hStmt Returns the handle to the ODBC statement
KeysetSize Returns or sets the number of rows in the keyset buffer
LockType Returns or sets the type of concurrency handling
MaxRows Returns or sets the maximum number of rows in the resultset
Name Returns the name of the object
Prepared Returns or sets whether the query should be prepared
QueryTimeout Returns or sets the query timeout
rdoColumns Returns the set of columns in the query
rdoParameters Returns the set of parameters in the query
RowsAffected Returns the number of rows affected by the most recent Execute method
RowsetSize Returns or sets the number of cursor rows in memory
SQL Returns or sets the SQL statement for the query
StillExecuting Returns whether an asynchronous query is still executing

Type Returns the type of the object

rdoResultsets Collection, rdoResultset Object

An rdoResultset object is the object used by the RDO to manage results from data retrieval operations. The rdoResultsets collection is used by rdoConnection objects to manage all the resultsets on that connection. Table C.28 lists the properties of the rdoResultsets collection. Table C.29 lists the events, Table C.30 lists the methods, and Table C.31 lists the properties of the rdoResultset object.

Table C.28. rdoResultsets collection properties.

PROPERTY DESCRIPTION
Count The number of objects in the collection
Item Returns the specified object from the collection

Table C.29. rdoResultset object events.

EVENT DESCRIPTION
Associate Fired after a new connection is associated with the object
Dissociate Fired after the associated connection is set to nothing
ResultsChanged Fired after the current rowset is changed
RowCurrencyChange Fired after the resultset is moved to a new row or no row
RowStatusChanged Fired after the current row's state changes
WillAssociate Fired before a new connection is associated with the object
WillDissociate Fired before the associated connection is set to nothing
WillUpdateRows Fired before the updated rows are applied to the server

Table C.30. rdoResultset object methods.

METHOD DESCRIPTION
AddNew Creates a new copy buffer for a new row
BatchUpdate Performs a batched optimistic update
Cancel Cancels an asynchronous query or pending result
CancelBatch Cancels uncommitted changes in a batch
CancelUpdate Cancels pending updates
Close Closes the object
Delete Deletes the current row
Edit Copies the current row to a copy buffer for editing
GetClipString Retrieves multiple rows into a string
GetRows Retrieves multiple rows into an array
MoreResults Moves to the next resultset
Move Repositions the current row
MoveFirst Moves to the first row
MoveLast Moves to the last row
MoveNext Moves to the next row
MovePrevious Moves to the previous row
Requery Requeries the resultset
Resync Retrieves the batch update conflict values for the current row
Update Saves the copy buffer to the database

Table C.31. rdoResultset object properties.

PROPERTY DESCRIPTION
AbsolutePosition Returns the row number of the rdoResultset object's current row
ActiveConnection Returns a reference to the parent rdoConnection
BatchCollisionCount Returns the number of rows with collisions in a batch update
BatchCollisionRows Returns an array of rows with collisions in a batch update
BatchSize Returns or sets the number of rows in a batch update
BOF Returns whether the current row precedes the first row
Bookmark Returns or sets a bookmark identifying the current row
Bookmarkable Returns whether an rdoResultset supports bookmarks
EditMode Returns the editing state of the current row
EOF Returns whether the current row is after the last row
hStmt Returns the ODBC statement handle
LastModified Returns the bookmark of the last modified row
LockEdits Returns whether locking is in effect while editing
LockType Returns or sets the type of concurrency handling
Name Returns the name of the object
PercentPosition Returns or sets the position in the rdoResultset by percentage
rdoColumns Returns the rdoColumn objects in the rdoResultset
Restartable Returns whether the object supports the Requery method
RowCount Returns the number of rows in the object
Status Returns or sets the status of the current row
StillExecuting Returns whether an asynchronous query is still executing
Transactions Returns whether the object supports transactions
Type Returns the type of the object
Updatable Returns whether the object is updatable
UpdateCriteria Returns or sets how the WHERE clause is constructed for each row during an optimistic batch update
UpdateOperation Returns or sets whether, during an optimistic batch update, to use an UPDATE or a DELETE/INSERT combination

rdoTables Collection, rdoTable Object

The rdoTables collection manages the table in an rdoConnection. The rdoTable object manages a table in an ODBC datasource. Table C.32 lists the properties of the rdoTables collection. Table C.33 shows the method for the rdoTable object, and Table C.34 lists the properties for the rdoTable object.

Table C.32. rdoTables collection properties.

PROPERTY DESCRIPTION
Count The number of objects in the collection
Item Returns the specified object from the collection

Table C.33. rdoTable object method.

METHOD DESCRIPTION
OpenResultset Creates a new rdoResultset

Table C.34. rdoTable object properties.

PROPERTY DESCRIPTION
Name Returns the name of the object
rdoColumns Returns the rdoColumn objects in the table
RowCount Returns the number of rows in the object
Type Returns the type of object
Updatable Indicates whether changes can be made to the object


Previous chapterNext chapterContents

© Copyright, Macmillan Computer Publishing. All rights reserved.