Workarea Operations

<< Click to Display Table of Contents >>

Navigation:  The Vo2Ado RDD > Basics >

Workarea Operations

Previous pageReturn to chapter overviewNext page

The following table lists what is happening 'under the hood' when you call a specific RDD operation.

We are using the DB..() function syntax here, but of course this also applies to the corresponding commands, VODB..() function and DbServer methods:

 

Operation

 

Description

 

DbUseArea()

 

The structure of the ADO Table is read and the workarea information for the table is initialized. The table is NOT opened. Also some of the properties of the workarea are set through Table CallBack methods.

 

DbGoTop()

 

If the table is not open, it will be opened. If the table is open, and a where clause resulting from a Seek is active, the table will be closed and reopened without this where clause

 

DbGoBottom()

 

If the table is not open, it will be opened.

 

DbSkip()

 

If the table is not open, it will be opened.

 

Recno()

 

If you have assigned a RecnoColumn, the value of this column will be returned, else the relative position in the current cursor

 

DbGoTo()

 

If you have assigned a RecnoColumn, the row with this value will be located, else the cursor will be moved to the relative position.

 

DbCreate()

 

A "Drop Table" SQL statement will be executed, followed by a Create Table SQL statement. The syntax of these statements can be set through Connection Callback Methods.

 

DbDelete()

 

The current row will be deleted. This delete is immediate and permanent, there is no way back. If you are in 'Append mode' the new record will be deleted.

 

DbReCall()

 

NOT SUPPORTED. Deleted are immediate and permanent.

 

Deleted()

 

Will return TRUE if you have just deleted a row and have not moved the record pointer yet. In all other cases will return FALSE.

 

DbAppend()

 

Will immediately append a blank row, fill all the columns of this row with the appropriate blank values and write the new row to the server. This requires that you have no checks on your server that don't allow blank row to be saved !

 

FieldGet()

 

If the table is not open, it will be opened.

 

FieldPut()

 

If the cursor allows updates the new value will be written to the server.

 

RLock() and FLock()

 

Will always return TRUE. Locking is handled by the server and depends on the open mode of the ADO Recordset

 

DbUnLock()

 

Will always return TRUE.

 

LastRec() and RecCount()

 

Return the number of rows in the current open cursor. This may be different from the real number of rows on the server

 

DbPack()

 

Will not do anything

 

DbZap()

 

Will execute a "Delete All From " SQL statement. The syntax of this statements can be set through a Connection Callback Method.

 

DbCreateIndex()/

OrdCreate()

 

A ADX file will be created that contains the index name and expression, and when possible an index is created on the server as well. The syntax of the Create Index SQL Statement can be set through a Connection Callback Method. A Current open cursor will be closed.

 

 

 

The Connection CallBack Method to translate VO function to SQL functions will also be called if the index expression contains functions.

 

 

 

 

 

DbSetIndex()

 

The index information in the ADX file will be read, and the first tag in this file will be activated. A Current open cursor will be closed.

 

 

 

The Connection CallBack Method to translate VO function to SQL functions will also be called if the index expression contains functions.

 

DbSetOrder() / OrdSetFocus()

 

If the order is available it will be activated. A Current open cursor will be closed. Please NOTE that THE CURRENT RECORD POSITION WILL NOT BE SAVED

 

OrdDestroy()

 

The order will be removed and a Current open cursor will be closed.

 

DbSeek()

 

A where clause will be built based on the seek value and the current index. When Soft seek is used all rows greater then or equal to the seek value will be selected, else only the row(s) that match the seek value. Please not that this selection will remain active until you do a GO TOP or start another operation that closed the current cursor.