Switch to: V14V13V12V11V10V9V8V7V6V5

VCursor Class: Properties

VCursor.BOF

BOF as Boolean

Returns TRUE if there was an attempt to go to the previous record of a Cursor while the first record of the Cursor has been already reached.

Note: This property provides functionality used by the ODBC API. This way you can navigate the records of a Cursor using a DO WHILE loop.

res = curs.BOF

VCursor.Database

Declaration:

Database as VDataBase

Description:

Returns the database of this cursor.

Example:

db = fld.Database

VCursor.EOF

EOF as Boolean

Returns TRUE if there was an attempt to go to the next record of a Cursor while the last record of the Cursor was already reached.

Note: This property provides functionality used by the ODBC API. This way you can navigate records of Cursor using a DO WHILE loop.

res = curs.EOF

VCursor.FieldCount

Declaration:

FieldCount as Integer

Description:

Returns the number of fields of this cursor.

Example:

fldCount = curs.FieldCount  // get local shortcut to avoid of calling in loop
for i = 1 to fldcount
	...
next

VCursor.Position

Declaration:

Position as Integer

Description:

The current position in the cursor. You can set or get the current position of the cursor using this property.

The valid range of values is from 1 to the number of records in the cursor.

When you assign a new value to the Position, Valentina loads a record from the disk to the memory buffer.

Note: If you try to assign a wrong value then the current record won`t be changed.

Example:

for i = 1 to curs.RecordCount
     curs.Position = i 
next

VCursor.Query

Declaration:

Query as String

Description:

The original query string

Example:

curs = db.SqlSelect(  "SELECT * FROM T2 WHERE f1 > 100" )
str = curs.Query  // str now is "SELECT * FROM T2 WHERE f1 > 100"

VCursor.RecordCount

Declaration:

RecordCount as Integer

Description:

Returns the number of records of the cursor.

Example:

recCount = curs.RecordCount // store into a local variable to avoid of calling it 
for i = 1 to fldcount
	...
next

VCursor.ReadOnly

Declaration:

ReadOnly as Boolean

Description:

Returns TRUE if the Cursor is read only, otherwise returns FALSE.

Example:

if( curs.ReadOnly )
	....