RDO Topics
<<Back
Next>>

rdoQueries


Contains rdoQuery objects that have been added to the rdoQueries collection, either automatically via the CreateQuery() method or with the Add() method.


rdoQuries Object Properties
Property Description
Item Returns a specific member of an RDO collection object, either by position or by key.
Count Returns the number of objects in a collection.



rdoQuery


The rdoQuery object is used to manage SQL queries that require the use of input, output, or input/output parameters. Basically, an rdoQuery functions as a compiled SQL statement. When you work with stored procedures or queries that require use of arguments that change from execution to execution, you can create an rdoQuery object to manage the query parameters. If your stored procedure returns output parameters or a return value, or you want to use rdoParameter objects to handle the parameters, you must use an rdoQuery object to manage it. For example if you submit a query that includes information provided by the user, such as date range or part number, RDO can substitute these values into the SQL statement automatically when the query is executed.


rdoQuery Object Properties
Property Description
BindThreshold Returns or sets a value specifying the largest column that will be automatically bound under ODBC.
HStmt Returns a value corresponding to the ODBC statement handle.
KeysetSize Returns or sets a value indicating the number of rows in the keyset buffer.
LockType Returns or sets Long integer value indicating the type of concurrency handling. If set to rdConcurReadOnly — cursor is read-only. No updates are allowed. If set to rdConcurLock — Pessimistic concurrency. If set to rdConcurValues — Optimistic concurrency based on row ID. If set to rdConcurValues — Optimistic concurrency based on row values. If set to rdConcurBatch — Optimistic concurrency using batch mode updates. Status values returned successfully for each row are updated.
MaxRows Returns or sets a value indicating the maximum number of rows to be returned from a query or processed in an action query.
Name returns the name of a RemoteData object.
QueryTimeout Returns or sets a value that specifies the number of seconds the ODBC Driver Manager waits before a timeout error occurs when a query is executed.
CursorType Returns or sets a value that specifies the default type of cursor to use when opening a result set from the specified query. If set to rdOpenForwardOnly — Fixed set, non-scrolling. If set to rdOpenKeyset — Updatable, fixed set, scrollable query result set cursor. If set to rdOpenDynamic — Updatable, dynamic set, scrollable query result set cursor. If set to rdOpenStatic — Read-only, fixed set.
Prepared Returns or sets a value that determines whether the query should be prepared using the SQLPrepare or SQLExecDirect ODBC API function.
RowsAffected Returns the number of rows affected by the most recently invoked Execute() method.
RowsetSize Returns or sets a value that determines the number of rows in an rdoResultset cursor.
SQL Returns or sets the SQL statement that defines the query executed by an rdoQuery.
StillExecuting Returns a boolean value that indicates whether a query is still executing.
Type Returns or sets a value that indicates the type or data type of an object.
ActiveConnection Returns or sets an object reference indicating the connection this query should be associated with.



rdoQuery Object Methods
Method Description
Cancel() Cancels the processing of a query running in asynchronous mode, or cancels any pending results against the specified RDO object.
Close() Closes an open remote data object.
Execute() Runs an action query or executes an SQL statement that doesn't return rows.
OpenResultset() Creates a new rdoResultset object.



rdoResultset


When you use remote data objects, you interact with data almost entirely using rdoResultset objects. rdoResultset object are created using the RemoteData control, or the OpenResultset() method of the rdoQuery, rdoTable, or rdoConnection object.

When you execute a query that contains one or more SQL statements, the data source returns zero or more rows in an rdoResultset object. All rdoResultset objects are constructed using rows and columns.

A single rdoResultset can contain zero or any number of result sets-so-called "multiple" result sets. Once you have completed processing the first result set in an rdoResultset object, use the MoreResults() method to discard the current rdoResultset rows and activate the next rdoResultset.You can process individual rows of the new result set just as you processed the first rdoResultset. You can repeat this until the MoreResults() method returns False.




rdoResultset Object Properties
Property Description
AbsolutePosition Sets or return the absolute row number of a rdoResultset object's current row.
BOF Returns a value that indicates whether the current row position is before the first row in a rdoResultset.
EOF Returns a value that indicates whether the current row position is after the last row in a rdoResultset.
Bookmark Sets or returns a bookmark that uniquely identifies the current row in a rdoResultset object. If you have a valid bookmark, you can use it to reposition the current row in an rdoResultset.
Bookmarkable Returns a value that indicates whether a rdoResultset object supports bookmarks, which you can set by using the Bookmark property.
EditMode Returns a value that indicates the state of editing for the current row. If set to rdEditNone — no editing operation is in progress. If set to rdEditInProgress — the Edit() method has been invoked, and the current row is in the copy buffer. If set to rdEditAdd — the AddNew() method has been invoked, and the current row in the copy buffer is a new row that hasn't been saved in the database.
HStmt Returns a value corresponding to the ODBC statement handle.
LastModified Returns a bookmark indicating the most recently added or changed row.
LockType Returns or sets a Long integer value indicating the type of concurrency handling. If set to rdConCurReadOnly — cursor is read-only; no updates are allowed. If set to rdConcurLock — pessimistic concurrency. If set to rdConCureRowVer — optimistic concurrency based on row ID. If set to rdConCurValues — optimistic concurrency based on row values. If set to rdConCurBatch — optimistic concurrency using batch-mode updates.
LockEdits Returns a Boolean value indicating the type locking that is in effect while editing.
Name Returns the name of a RemoteData object.
PercentPosition Sets or returns a value indicating the approximate location of the current row in the rdoResultset object, based on a percentage of the rows in the rdoResultset.
BatchCollisionCount Returns a value that specifies the number of rows that did not complete the last batch-mode update.
BatchCollisionRows Returns an array of bookmarks indicating the rows that generated collision in the last batch-update operation.
BatchSize Sets or returns the number of statements sent back to the server in each batch.
Status Returns or sets the current status of the current row or column. If set to rdRowUnmodified — the row or column hasn't been modified or has been updated successfully. If set to rdRowModified — the row or column has been modified, but not updated in the database. If set to rdRowNew — the row or column has been inserted with the AddNew() method, but hasn't been inserted yet into the database. If set to rdRowDeleted — the row or column has been deleted, but hasn't been deleted yet in the database. If set to rdRowDBeleted — the row or column has been deleted locally and in the database.
UpdateCriteria Returns or sets a value that specifies how the Where clause is constructed for each row during an optimistic batch-update operation. If set to rdCriteriaKey — uses just the key column(s) in the Where clause. If set to rdCriteriaAllCols — uses the key column(s) and all updated columns in the Where clause. If set to rdCriteriaUpdCols — uses the key column(s) and all the columns in the Where clause. If set to rdCriteriaTimeStamp — uses just the timestamp column, if available.
UpdateOperation Returns or sets a value that specifies whether the optimistic batch update should use an Update statement or a Delete followed by an Insert. If set to rdOperationUpdate — uses an Update statement for each modified row. If set to rdOperationDelIns — uses a pair of Delete and Insert statements for each modified row.
Restartable Returns a value that indicates whether a rdoResultset object supports the Requery() method, which re-executes the query on which the rdoResultset object is based on.
RowCount Returns the number of records accessed in a rdoResultset object.
StillExecuting Returns a Boolean value that indicates whether a query is still executing.
Transactions Returns a value that indicates whether an object supports the recording of a series of changes that can later be rolled back (undone) or committed (saved).
Type Sets or returns a value that indicates the operational type or data type of an object.
Updatable Returns a Boolean value that indicates whether changes can be made to a remote data object.
ActiveConnection Returns or sets an object reference indicating the conection that the query should be associated with.



rdoResultset Object Method
Method Description
AddNew() Creates a new row for an updatable rdoResultset object.
Cancel() Cancels the processing of a query running in asynchronous mode, or cancels any pending results against the specified RDO object.
CancelUpdate() Cancels any pending updates to an rdoResultset object.
Close() Closes an open remote data object.
Delete() Deletes the current row in an updatable rdoResultset object.
Edit() Enables changes to data values in the current row of an updatable rdoResultset object.
GetRows() Retrieves multiple rows of an rdoResultset into an array.
MoreResults() Clears the current result set of any pending rows and returns a Boolean value that indicates whether one or more additional result sets are pending.
Move() Repositions the current row pointer in an rdoResultset object.
MoveFirst() Move to the first record in the result set.
MoveLast() Move to the last record in the result set.
MoveNext() Move to the next record in the result set.
MovePrevious() Move to the previous record in the result set.
Requery() Re-run the previous query.
Update() Saves the contents of the copy buffer row to a specified updatable rdoResultset object and then discards the copy buffer.
BatchUpdate() Performs a batch optimistic update.
CancelBatch() Cancels alll uncimmitted changes in the local cursor (used in batch mode).
GetClipString() Returns a delimited string for 'n' rows in a result set.



rdoResultsets


The rdoResultsets collection contains all open rdoResultset objects in an rdoConnection. A new rdoResultset is automatically added to the rdoResultset collection when you open the object, and it's automatically removed when you close it. Several rdoResultset objects might be active at any one time.


rdoResultsets Object Properties
Property Description
Item Returns a specific member of an RDO collection object, either by position or by key.
Count Returns the number of objects in a collection.



rdoTables


The rdoTables collection contains all stored rdoTable objects in a database. The rdoTables object supports just one method, Refresh(), which either closes or rebuilds the rdoResultset object created by a RemoteData control or refreshes the members of the collections in the Applies To list. The Refresh() method doesn't take any parameters.


rdoTables Object Properties
Property Description
Item Returns a specific member of an RDO collection object, either by position or by key.
Count Returns the number of objects in a collection.



rdoTable


An rdoTable object represents the stored definition of a base table or an SQL view. The rdoTable supports just one method, OpenResultset(), which opens a new record set. It has the following syntax:

Set variable = object.OpenResultset_
([type [,locktype [,option]]])

The variable parameter is an object expression that evaluates to an rdoResultset object. The object parameter is an object expression that evaluates to an existing rdoQuery or rdoTable object that you want to use to create the new rdoResultset. The name parameter is a String that specifies the source of the rows from the new rdoResultset. This argument specify the name of an rdoTable. object, the name of an rdoQuery, or an SQL statement that might return rows. The type parameter is a Variant or constant that specifies the type of cursor to create. The Locktype parameter is a Variant or constant that specifies the type of concurrency control. The option parameter is a Variant or constant that specifies characteristics of the new rdoResultset.




rdoTable Object Properties
Property Description
Name Returns the name of the RemoteData object.
RowCount Returns the number of rows accessed in an rdoResultset object.
Type Returns or sets a value that indicates the type or data type of an object.
Updatable Returns a Boolean value that indicates whether changes can be made to a remote data object.





<<Back
top
Next>>





Copyright� 2000 by Noel