About  Usage  ADOxtra  Common  Connection  Recordset  Field  Property

ADOxtra Recordset object functions:

Opening/Closing functions:
Open(),
Close(),
Cancel(),
Requery(),
 
Data accessing functions:
MoveNext(),
MovePrevious(),
MoveFirst(),
MoveLast(),
GetFieldValue(),
GetString(),
 
Data modification functions:
AddNew(),
Delete_(),
SetFieldValue()
Update(),
CancelUpdate(),
UpdateBatch(),
CancelBatch(),
 
Recordset information functions:
Supports()

ADOxtra Recordset object properties:

Initialization properties:
Source,
ActiveConnection,
CursorType,
LockType,
CacheSize,
MaxRecords,
CursorLocation,
MarshalOptions,
Properties collection,
 
Data accessing properties:
Fields collection,
RecordCount,
PageCount,
PageSize,
AbsolutePage,
AbsolutePosition,
Bookmark,
Sort,
Filter,
 
State information properties:
State,
EOF,
BOF,
EditMode,
Status

Recordset.Open()

Syntax

bSuccess=Recordset.Open(source,activeConnection,cursorType,lockType,options)

Parameters

source
Optional. String value that contains an SQL statement, table name, or stored procedure.
 
activeConnection
Optional. Either a ADODB.Connection object variable name, or a String that contains ConnectionString parameters. Use BuildConnectionString xtra level method to invoke a dialog for building connection string.
 
cursorType
Optional. An integer value that determines the type of cursor that the provider should use when opening the Recordset. The default value is adOpenForwardOnly. It can be one of the following values:
Constant Value Description
adOpenDynamic 2 Uses a dynamic cursor. Additions, changes, and deletions by other users are visible, and all types of movement through the Recordset are allowed, except for bookmarks, if the provider doesn't support them.
adOpenForwardOnly 0 Default. Uses a forward-only cursor. Identical to a static cursor, except that you can only scroll forward through records. This improves performance when you need to make only one pass through a Recordset.
adOpenKeyset 1 Uses a keyset cursor. Like a dynamic cursor, except that you can't see records that other users add, although records that other users delete are inaccessible from your Recordset. Data changes by other users are still visible.
adOpenStatic 3 Uses a static cursor. A static copy of a set of records that you can use to find data or generate reports. Additions, changes, or deletions by other users are not visible.
adOpenUnspecified -1 Does not specify the type of cursor.
 
lockType
Optional. An integer value that determines what type of locking (concurrency) the provider should use when opening the Recordset. The default value is adLockReadOnly. It can be one of the following values:
Constant Value Description
adLockBatchOptimistic 4 Indicates optimistic batch updates. Required for batch update mode.
adLockOptimistic 3 Indicates optimistic locking, record by record. The provider uses optimistic locking, locking records only when you call the Update method.
adLockPessimistic 2 Indicates pessimistic locking, record by record. The provider does what is necessary to ensure successful editing of the records, usually by locking records at the data source immediately after editing.
adLockReadOnly 1 Indicates read-only records. You cannot alter the data.
adLockUnspecified -1 Does not specify a type of lock. For clones, the clone is created with the same lock type as the original.
 
options
Optional. Integer value that that indicates how the provider should evaluate the source argument. It may be a bitmask of one or more of the folowing constants:
Constant Value Description
adAsyncExecute 16 Indicates that the command should execute asynchronously.
adAsyncFetch 32 Indicates that the remaining rows after the initial quantity specified in the cacheSize property should be retrieved asynchronously.
adAsyncFetchNonBlocking 64 Indicates that the main thread never blocks while retrieving. If the requested row has not been retrieved, the current row automatically moves to the end of the file.
adExecuteNoRecords 128 Indicates that the command text is a command or stored procedure that does not return rows (for example, a command that only inserts data). If any rows are retrieved, they are discarded and not returned.
adOptionUnspecified -1 Indicates that the command is unspecified.
Constant Value Description
adCmdUnspecified -1 Does not specify the command type argument.
adCmdText 1 Evaluates source parameter as a textual definition of a command or stored procedure call.
adCmdTable 2 Evaluates source parameter as a table name whose columns are all returned by an internally generated SQL query.
adCmdStoredProc 4 Evaluates source parameter as a stored procedure name.
adCmdUnknown 8 Default. Indicates that the type of command in the source parameter property is not known.

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the Open() method of the wrapped ADODB.Recordset object. Using the Open method on a Recordset object opens a cursor that represents records from a base table or the results of a query.

Recordset.Cancel()

Syntax

bSuccess=Recordset.Cancel()

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the Cancel() method of the wrapped ADODB.Recordset object. Use the Cancel method to terminate execution of an asynchronous Open() method call (that is, a method invoked with the adAsyncExecute, or adAsyncFetch option).

Recordset.Requery()

Syntax

bSuccess=Recordset.Requery(options)

Parameters

options
Optional. Integer value that that indicates how the provider should perform the requested operation. See Open() method for details about options parameter.

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the Requery() method of the wrapped ADODB.Recordset object. Use the Requery method to refresh the entire contents of a Recordset object from the data source by reissuing the original command and retrieving the data a second time. Calling this method is equivalent to calling the Close and Open methods in succession. If you are editing the current record or adding a new record, an error occurs.

Recordset.Close()

Syntax

bSuccess=Recordset.Close()

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the Close() method of the wrapped ADODB.Recordset object. Use the Close method to close a Recordset to free any associated system resources. Closing an object does not remove it from memory; you can change its property settings and open it again later. To completely eliminate an object from memory, set the object variable to VOID after closing the object.
If an edit is in progress while in immediate update mode, calling the Close method generates an error; instead, call the Update or CancelUpdate method first. If you close the Recordset object while in batch update mode, all changes since the last UpdateBatch call are lost.

Recordset.AddNew()

Syntax

bSuccess=Recordset.AddNew()

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the AddNew() method of the wrapped ADODB.Recordset object. After you call the AddNew method, the new record becomes the current record and remains current after you call the Update method.
After you call the AddNew method, the new record becomes the current record and remains current after you call the Update method. If the Recordset object does not support bookmarks, you may not be able to access the new record once you move to another record. Depending on your cursor type, you may need to call the Requery method to make the new record accessible.

If you call AddNew while editing the current record or while adding a new record, ADO calls the Update method to save any changes and then creates the new record.

Version

Not supported in Lite version

Recordset.Delete_()

Syntax

bSuccess=Recordset.Delete_(affectRecords) -- Note the syntax "Delete_"

Parameters

affectRecords
Optional. An Integer value that determines how many records the Delete method will affect. The default value is adAffectCurrent. It can be one of the following values:
Constant Value Description
adAffectAll 3 If there is not a Filter applied to the Recordset, affects all records.

If the Filter property is set to a string criteria (such as "Author='Smith'"), then the operation affects visible records in the current chapter.

If the Filter property is set to a member of the FilterGroupEnum, then the operation will affect all rows of the Recordset.

adAffectAllChapters 4 Affects all records in all sibling chapters of the Recordset, including those not visible via any Filter that is currently applied.
adAffectCurrent 1 Affects only the current record.
adAffectGroup 2 Affects only records that satisfy the current Filter property setting. You must set the Filter property to a FilterGroupEnum value.

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the Delete() method of the wrapped ADODB.Recordset object.
Using the Delete method marks the current record or a group of records in a Recordset object for deletion. If the Recordset object doesn't allow record deletion, an error occurs. If you are in immediate update mode, deletions occur in the database immediately. If a record cannot be successfully deleted (due to database integrity violations, for example), the record will remain in edit mode after the call to Update. This means that you must cancel the update with CancelUpdate before moving off the current record (for example, with Close, Move).
If you are in batch update mode, the records are marked for deletion from the cache and the actual deletion happens when you call the UpdateBatch method. (Use the Filter property to view the deleted records.)
Retrieving field values from the deleted record generates an error. After deleting the current record, the deleted record remains current until you move to a different record. Once you move away from the deleted record, it is no longer accessible.
If you nest deletions in a transaction, you can recover deleted records with the RollbackTrans method. If you are in batch update mode, you can cancel a pending deletion or group of pending deletions with the CancelBatch method.

Version

Not supported in Lite version

Recordset.CancelUpdate()

Syntax

bSuccess=Recordset.CancelUpdate()

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the CancelUpdate() method of the wrapped ADODB.Recordset object. Use the CancelUpdate method to cancel any changes made to the current row or to discard a newly added row. You cannot cancel changes to the current row or a new row after you call the Update method.

Version

Not supported in Lite version

Recordset.Update()

Syntax

bSuccess=Recordset.Update()

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the Update() method of the wrapped ADODB.Recordset object. Use the Update method to save any changes you make to the current record of a Recordset object since calling the AddNew method or since changing any field values in an existing record. The Recordset object must support updates.

Version

Not supported in Lite version

Recordset.CancelBatch()

Syntax

bSuccess=Recordset.CancelBatch(affectRecords)

Parameters

affectRecords
Optional. An Integer value that determines how many records the CancelBatch method will affect. The default value is adAffectAll. See affectRecords parameter of Delete method for the list of acceptable values:

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the CancelBatch() method of the wrapped ADODB.Recordset object. Use the CancelBatch method to cancel any pending updates in a Recordset in batch update mode. If the Recordset is in immediate update mode, calling CancelBatch without adAffectCurrent generates an error.

Version

Not supported in Lite version

Recordset.UpdateBatch()

Syntax

bSuccess=Recordset.UpdateBatch(affectRecords)

Parameters

affectRecords
Optional. An Integer value that determines how many records the CancelBatch method will affect. The default value is adAffectAll. See affectRecords parameter of Delete method for the list of acceptable values:

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the UpdateBatch() method of the wrapped ADODB.Recordset object. Use the UpdateBatch method when modifying a Recordset object in batch update mode to transmit all changes made in a Recordset object to the underlying database.

If the Recordset object supports batch updating, you can cache multiple changes to one or more records locally until you call the UpdateBatch method. If you are editing the current record or adding a new record when you call the UpdateBatch method, ADO will automatically call the Update method to save any pending changes to the current record before transmitting the batched changes to the provider. You should use batch updating with either a keyset or static cursor only.

Version

Not supported in Lite version

Recordset.MoveNext()

Syntax

bSuccess=Recordset.MoveNext()

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the MoveNext() method of the wrapped ADODB.Recordset object. Use the MoveNext method to move the current record position one record forward (toward the bottom of the Recordset). If the last record is the current record and you call the MoveNext method, ADO sets the current record to the position after the last record in the Recordset (EOF is True). An attempt to move forward when the EOF property is already True generates an error.

Recordset.MovePrevious()

Syntax

bSuccess=Recordset.MovePrevious()

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the MovePrevious() method of the wrapped ADODB.Recordset object. Use the MovePrevious method to move the current record position one record backward (toward the top of the Recordset). The Recordset object must support bookmarks or backward cursor movement; otherwise, the method call will generate an error. If the first record is the current record and you call the MovePrevious method, ADO sets the current record to the position before the first record in the Recordset (BOF is True). An attempt to move backward when the BOF property is already True generates an error. If the Recordset object does not support either bookmarks or backward cursor movement, the MovePrevious method will generate an error.

Recordset.MoveFirst()

Syntax

bSuccess=Recordset.MoveFirst()

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the MoveFirst() method of the wrapped ADODB.Recordset object. Use the MoveFirst method to move the current record position to the first record in the Recordset.

Recordset.MoveLast()

Syntax

bSuccess=Recordset.MoveLast()

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Calls the MoveLast() method of the wrapped ADODB.Recordset object. Use the MoveLast method to move the current record position to the last record in the Recordset. The Recordset object must support bookmarks or backward cursor movement; otherwise, the method call will generate an error.

Recordset.GetFieldValue()

Syntax

put Recordset.GetFieldValue(Integer fieldIndex)
put Recordset.GetFieldValue(String fieldName)

Parameters

fieldIndex
Integer zero based index of the field object in Recordset.Fields collection
 
fieldName
String that identifies the field object in Recordset.Fields collection.

Returns

Any
If operation competed successfully, this function returns the value of the field indicated by fieldIndex or fieldName
 
Void
If operation failed this function sets internal error flag and returns VOID

Description

Gets the value of the recordset's field indicated by fieldIndex or fieldName. It gets the Recordset.Fields.Item[Index].Value of the wrapped ADODB.Recordset object. See ADOxtra type casting topic for more details about how ADOxtra converts ADO value to Lingo value.

Recordset.GetString()

Syntax

put Recordset.GetString(stringFormat,numRows,columnDelimiter,rowDelimiter,nullExpr)

Parameters

stringFormat
Integer value that specifies how recordset data should be converted to a string. It can be one of the following values:
Constant Value Description
adClipString 2 Delimits rows by RowDelimiter, columns by ColumnDelimiter, and null values by NullExpr. These three parameters of the GetString method are valid only with a StringFormat of adClipString.
 
numRows
Optional. The number of rows to be converted in the Recordset. If numRows is not specified, or if it is greater than the total number of rows in the Recordset, then all the rows in the Recordset are converted.
 
columnDelimiter
String. Optional. A delimiter used between columns, if specified, otherwise the TAB character. .
 
rowDelimiter
String. Optional. A delimiter used between rows, if specified, otherwise the CARRIAGE RETURN character.
 
nullExpr
String. Optional. An expression used in place of a null value, if specified, otherwise the empty string.

Returns

String
If operation competed successfully, this function returns the string representation of recordset data.

Description

Calls the GetString() method of the wrapped ADODB.Recordset object. Use it to get the string representation of recordset data.

Recordset.SetFieldValue()

Syntax

bSuccess=Recordset.SetFieldValue(Integer fieldIndex, Any newValue)
bSuccess=Recordset.SetFieldValue(String fieldName, Any newValue)

Parameters

fieldIndex
Integer zero based index of the field object in Recordset.Fields collection
 
fieldName
String that identifies the field object in Recordset.Fields collection.
 
newValue
New value to be placed into the Value property of the field object indicated by fieldIndex or fieldName.

Returns

Integer
True (1) if function completed successfully, false (0) otherwise

Description

Sets the value of the recordset's field indicated by fieldIndex or fieldName. It sets the Recordset.Fields.Item[Index].Value of the wrapped ADODB.Recordset object with newValue. See ADOxtra type casting topic for more details about how ADOxtra converts Lingo value to ADO value.

Version

Not supported in the Lite version

Recordset.Supports()

Syntax

bIsSupported=Recordset.Supports(cursorOptions)

Parameters

cursorOptions
Integer value that consists of one or more of following values:
Constant Value Description
adAddNew 0x1000400 Supports the AddNew method to add new records.
adApproxPosition 0x4000 Supports the AbsolutePosition and AbsolutePage properties.
adBookmark 0x2000 Supports the Bookmark property to gain access to specific records.
adDelete 0x1000800 Supports the Delete method to delete records.
adFind 0x80000 Supports the Find method to locate a row in a Recordset.
adHoldRecords 0x100 Retrieves more records or changes the next position without committing all pending changes.
adIndex 0x100000 Supports the Index property to name an index.
adMovePrevious 0x200 Supports the MoveFirst and MovePrevious methods, and Move or GetRows methods to move the current record position backward without requiring bookmarks.
adNotify 0x40000 Indicates that the underlying data provider supports notifications (which determines whether Recordset events are supported).
adResync 0x20000 Supports the Resync method to update the cursor with the data that is visible in the underlying database.
adSeek 0x200000 Supports the Seek method to locate a row in a Recordset.
adUpdate 0x1008000 Supports the Update method to modify existing data.
adUpdateBatch 0x10000 Supports batch updating (UpdateBatch and CancelBatch methods) to transmit groups of changes to the provider.

Returns

Boolean
value that indicates whether all of the features identified by the cursorOptions argument are supported by the provider.

Description

Calls the Supports() method of the wrapped ADODB.Recordset object. Use the Supports method to determine what types of functionality a Recordset object supports. If the Recordset object supports the features whose corresponding constants are in cursorOptions, the Supports method returns True. Otherwise, it returns False.

Recordset.Fields[ ]

Syntax

val=Recordset.Fields[fieldIndex]
Recordset.Fields[fieldIndex]=newVal
fieldsCount=Recordset.Fields.Count

Parameters

fieldIndex
String field name or Integer zero based index of the field object in Recordset.Fields collection

Sets or gets

Any
recordset field value

Description

Allows access to the Value property of the field objects in Fields collection of the wrapped ADODB.Recordset object.

Version

Set operations are not supported in the Lite version

Example

put rst.fields["Id"] & ":" && rst.fields["Name"]
rst.fields["Name"]="NewName"

Recordset.Fields[ ].propName

Syntax

objADOField=Recordset.Fields[fieldIndex].ref
fieldName=Recordset.Fields[fieldIndex].Name
fieldName=objADOField.Name
val=objADOField.Value
objADOField.Value=newVal

Parameters

fieldIndex
String field name or Integer zero based index of the field object in Recordset.Fields collection

Returns

Object
wrapper for the corresponding ADODB.Field object

Description

Allows access to the Field objects of the Fields collection of the wrapped ADODB.Recordset object. Each Field object corresponds to a column in the Recordset. Calling this function creates new Lingo object that serves as ADODB.Field wrapper.

Example

on ShowCurrentRecord rst
  repeat with i = 0 to rst.Fields.Count - 1
    put rst.Fields[i].Name & "=" & rst.Fields[i]
  end repeat
end

Recordset.Properties[ ]

Syntax

val=Recordset.Properties[propertyIndex]
Recordset.Properties[propertyIndex]=newVal
propertiesCount=Recordset.Properties.Count

Parameters

propertyIndex
String property name or Integer zero based index of the property object in Recordset.Properties collection

Sets or gets

Any
connection property value

Description

Allows access to the Value property of the property objects in Properties collection of the wrapped ADODB.Recordset object. Each Property object corresponds to a characteristic of the ADODB.Recordset object specific to the provider.

Example

  on ShowProperties ref
    repeat with i= 0 to ref.Properties.Count - 1
      put ref.Properties[i].Name & "=" &   ref.Properties[i]
    end repeat
  end

Recordset.Properties[ ].propName

Syntax

objADOProperty=Recordset.Properties[propertyIndex].ref
propertyName=objADOProperty.Name
val=objADOProperty.Value
objADOProperty.Value=newVal
 
propertiesCount=Recordset.Properties.Count
propertyName=Recordset.Properties[propertyIndex].Name
propertyType=Recordset.Properties[propertyIndex].Type
propertyValue=Recordset.Properties[propertyIndex].Value
propertyAttributes=Recordset.Properties[propertyIndex].Attributes

Example

  on ShowProperties ref
    repeat with i= 0 to ref.Properties.Count - 1
      put ref.Properties[i].Name & "=" &   ref.Properties[i]
    end repeat
  end

Parameters

propertyIndex
String property name or Integer zero based index of the property object in Recordset.Properties collection

Returns

Object
wrapper for the corresponding ADODB.Property object

Description

Allows access to the Property objects of the Properties collection of the wrapped ADODB.Recordset object. Each Property object corresponds to a characteristic of the ADODB.Recordset object specific to the provider.

Recordset.State

Syntax

put Recordset.State

Returns

Integer
Value that indicates the state of the Recordset object. It may be a bitmask of following values:
Constant Value Description
rst.adStateClosed 0 Indicates that the object is closed.
rst.adStateOpen 1 Indicates that the object is open.
rst.adStateConnecting 2 Indicates that the object is connecting.
rst.adStateExecuting 4 Indicates that the object is executing a command.
rst.adStateFetching 8 Indicates that the rows of the object are being retrieved.

Description

Returns the state property of the wrapped ADODB.Recordset object. Indicates whether the state of the object is open or closed.

Recordset.Source

Syntax

put Recordset.Source
Recordset.Source="SELECT * FROM Authors"

Sets or gets

String
value that indicates the data source for a Recordset object.

Description

Sets or gets the Source property of the wrapped ADODB.Recordset object. Use the Source property to specify a data source for a Recordset object using one of the following: an SQL statement, a stored procedure, or a table name.

Recordset.ActiveConnection

Syntax

Recordset.ActiveConnection="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=demoDb.mdb"
Recordset.ActiveConnection=objConnection
put Recordset.ActiveConnection

Gets

Object
ADOxtra wrapper for ADODB.Connection object that is the current Connection object of the recordset.
 
Symbol #Null
if there is no current connection which recordset is bound to.

Sets

String
contains a definition for a connection. In this case, the provider creates a new ADODB.Connection object using this definition and opens the connection. Use BuildConnectionString xtra level method to invoke a dialog for building connection string.
 
Object
ADOxtra wrapper for opened ADODB.Connection object. Use CreateObject(xtra"ADOxtra",#Connection) to create such object.
 
Symbol #Null
To detach recordset from the connection use #Null. It is possible if cursorLocation is set to adUseClient.

Description

Sets or gets the ActiveConnection property of the wrapped ADODB.Recordset object. Use the ActiveConnection property to determine the Connection object over which the specified Recordset will be opened.

Recordset.CursorType

Syntax

put Recordset.CursorType
Recordset.CursorType=1
Recordset.CursorType=Recordset.adOpenForwardOnly
Recordset.CursorType=Recordset.adOpenDynamic
Recordset.CursorType=Recordset.adOpenKeyset
Recordset.CursorType=Recordset.adOpenStatic

Sets or gets

Integer
value that indicates the type of cursor used in a Recordset object. See Open() method for details about cursorType parameter and a list of possible values.

Description

Sets or gets the CursorType property of the wrapped ADODB.Recordset object. Use the CursorType property to specify the type of cursor that should be used when opening the Recordset object. ADOxtra provides following constants:
 

Recordset.LockType

Syntax

put Recordset.LockType
Recordset.LockType=1
Recordset.LockType=Recordset.adLockReadOnly
Recordset.LockType=Recordset.adLockPessimistic
Recordset.LockType=Recordset.adLockOptimistic
Recordset.LockType=Recordset.adLockBatchOptimistic

Sets or gets

Integer
value that indicates the type of locks placed on records during editing. See Open() method for details about cursorType parameter and a list of possible values.

Description

Sets or gets the LockType property of the wrapped ADODB.Recordset object. Set the LockType property before opening a Recordset to specify what type of locking the provider should use when opening it. Read the property to return the type of locking in use on an open Recordset object. The LockType property is read/write when the Recordset is closed and read-only when it is open. ADOxtra provides following constants:
 

Recordset.CursorLocation

Syntax

put Recordset.CursorLocation
Recordset.CursorLocation=Recordset.adUseServer
Recordset.CursorLocation=Recordset.adUseClient

Sets or gets

Integer
value value that can be set to one of the following values:
Constant Value Description
rst.adUseClient 3 Uses client-side cursors supplied by a local cursor library. Local cursor services often will allow many features that driver-supplied cursors may not, so using this setting may provide an advantage with respect to features that will be enabled. For backward compatibility, the synonym adUseClientBatch is also supported.
rst.adUseServer 2 Default. Uses data-provider or driver-supplied cursors. These cursors are sometimes very flexible and allow for additional sensitivity to changes others make to the data source.

Description

Sets or gets the CursorLocation property of the wrapped ADODB.Recordset object. This property allows you to choose between various cursor libraries accessible to the provider. Usually, you can choose between using a client-side cursor library or one that is located on the server. Recordset objects will automatically inherit this setting from their associated connections.

Recordset.MarshalOptions

Syntax

put Recordset.MarshalOptions
Recordset.MarshalOptions=Recordset.adMarshalAll
Recordset.MarshalOptions=Recordset.adMarshalModifiedOnly

Sets or gets

Integer
value that can be set to one of the following values:
Constant Value Description
adMarshalAll 0 Default. Returns all rows to the server.
adMarshalModifiedOnly 1 Returns only modified rows to the server.

Description

Sets or gets the MarshalOptions property of the wrapped ADODB.Recordset object. When using a client-side Recordset, records that have been modified on the client are written back to the middle tier or Web server through a technique called marshaling, the process of packaging and sending interface method parameters across thread or process boundaries. Setting the MarshalOptions property can improve performance when modified remote data is marshaled for updating back to the middle tier or Web server.

Recordset.EOF

Syntax

put Recordset.EOF

Returns

Integer (1 or 0)
Indicates that the current record position is after the last record in a Recordset object.

Description

Returns the EOF property of the wrapped ADODB.Recordset object. Use the BOF and EOF properties to determine whether a Recordset object contains records or whether you've gone beyond the limits of a Recordset object when you move from record to record. The EOF property returns True (1) if the current record position is after the last record and False (0) if the current record position is on or before the last record. If either the BOF or EOF property is True, there is no current record.

Recordset.BOF

Syntax

put Recordset.BOF

Returns

Integer (1 or 0)
Indicates that the current record position is before the first record in a Recordset object.

Description

Returns the BOF property of the wrapped ADODB.Recordset object. Use the BOF and EOF properties to determine whether a Recordset object contains records or whether you've gone beyond the limits of a Recordset object when you move from record to record. The BOF property returns True (1) if the current record position is before the first record and False (0) if the current record position is on or after the first record. If either the BOF or EOF property is True, there is no current record.

Recordset.EditMode

Syntax

put Recordset.EditMode

Returns

Integer
value that indicates the editing status of the current record. It can be one of the following values:
Constant Value Description
adEditNone 0 Indicates that no editing operation is in progress.
adEditInProgress 1 Indicates that data in the current record has been modified but not saved.
adEditAdd 2 Indicates that the AddNew method has been called, and the current record in the copy buffer is a new record that has not been saved in the database.
adEditDelete 4 Indicates that the current record has been deleted.

Description

Returns the EditMode property of the wrapped ADODB.Recordset object. ADO maintains an editing buffer associated with the current record. This property indicates whether changes have been made to this buffer, or whether a new record has been created. Use the EditMode property to determine the editing status of the current record. ADOxtra provides following constants:

Recordset.Status

Syntax

put Recordset.Status

Returns

Integer
value that indicates the status of the current record with respect to batch updates or other bulk operations. It can be a sum of one or more of the following values:
Constant Value Description
adRecCanceled 0x100 Indicates that the record was not saved because the operation was canceled.
adRecCantRelease 0x400 Indicates that the new record was not saved because the existing record was locked.
adRecConcurrencyViolation 0x800 Indicates that the record was not saved because optimistic concurrency was in use.
adRecDBDeleted 0x40000 Indicates that the record has already been deleted from the data source.
adRecDeleted 0x4 Indicates that the record was deleted.
adRecIntegrityViolation 0x1000 Indicates that the record was not saved because the user violated integrity constraints.
adRecInvalid 0x10 Indicates that the record was not saved because its bookmark is invalid.
adRecMaxChangesExceeded 0x2000 Indicates that the record was not saved because there were too many pending changes.
adRecModified 0x2 Indicates that the record was modified.
adRecMultipleChanges 0x40 Indicates that the record was not saved because it would have affected multiple records.
adRecNew 0x1 Indicates that the record is new.
adRecObjectOpen 0x4000 Indicates that the record was not saved because of a conflict with an open storage object.
adRecOK 0 Indicates that the record was successfully updated.
adRecOutOfMemory 0x8000 Indicates that the record was not saved because the computer has run out of memory.
adRecPendingChanges 0x80 Indicates that the record was not saved because it refers to a pending insert.
adRecPermissionDenied 0x10000 Indicates that the record was not saved because the user has insufficient permissions.
adRecSchemaViolation 0x20000 Indicates that the record was not saved because it violates the structure of the underlying database.
adRecUnmodified 0x8 Indicates that the record was not modified.

Description

Returns the EditMode property of the wrapped ADODB.Recordset object. Use the Status property to see what changes are pending for records modified during batch updating. You can also use the Status property to view the status of records that fail during bulk operations, such as when you call the Resync, UpdateBatch, or CancelBatch methods on a Recordset object. With this property, you can determine how a given record failed and resolve it accordingly.

Recordset.RecordCount

Syntax

put Recordset.RecordCount

Returns

Integer
Indicates the number of records in a Recordset object.

Description

Returns the RecordCount property of the wrapped ADODB.Recordset object. Use the RecordCount property to find out how many records are in a Recordset object. The property returns -1 when ADO cannot determine the number of records or if the provider or cursor type does not support RecordCount. Reading the RecordCount property on a closed Recordset causes an error.

Recordset.PageCount

Syntax

put Recordset.PageCount

Returns

Integer
Indicates how many pages of data the Recordset object contains.

Description

Returns the PageCount property of the wrapped ADODB.Recordset object. Use the PageCount property to determine how many pages of data are in the Recordset object. Pages are groups of records whose size equals the PageSize property setting. Even if the last page is incomplete because there are fewer records than the PageSize value, it counts as an additional page in the PageCount value. If the Recordset object does not support this property, the value will be -1 to indicate that the PageCount is indeterminable. See the PageSize and AbsolutePage properties for more on page functionality.

Recordset.PageSize

Syntax

put Recordset.PageSize
Recordset.PageSize=10

Sets or gets

Integer
value that indicates how many records constitute one page in the Recordset.

Description

Sets or gets the PageSize property of the wrapped ADODB.Recordset object. Use the PageSize property to determine how many records make up a logical page of data. Establishing a page size allows you to use the AbsolutePage property to move to the first record of a particular page.
This property can be set at any time, and its value will be used for calculating the location of the first record of a particular page.

Recordset.AbsolutePage

Syntax

put Recordset.AbsolutePage
Recordset.AbsolutePage=5

Gets

Integer
value that indicates on which page the current record resides or one of the following values:
Constant Value Description
adPosBOF -2 Indicates that the current record pointer is at BOF (that is, the BOF property is True).
adPosEOF -3 Indicates that the current record pointer is at EOF (that is, the EOF property is True).
adPosUnknown -1 Indicates that the Recordset is empty, the current position is unknown, or the provider does not support the AbsolutePage or AbsolutePosition property.

Sets

Integer
value to move the current record to the first record of a particular page.

Description

Sets or gets the AbsolutePage property of the wrapped ADODB.Recordset object. Use the AbsolutePage property to identify the page number on which the current record is located. Use the PageSize property to logically divide the Recordset object into a series of pages, each of which has the number of records equal to PageSize (except for the last page, which may have fewer records). The provider must support the appropriate functionality for this property to be available. Like the AbsolutePosition property, AbsolutePage is 1-based and equals 1 when the current record is the first record in the Recordset. Set this property to move to the first record of a particular page. Obtain the total number of pages from the PageCount property.

Recordset.AbsolutePosition

Syntax

put Recordset.AbsolutePosition
Recordset.AbsolutePosition=25

Gets

Integer
value that indicates the ordinal position of a Recordset object's current record or one of the following values:
Constant Value Description
adPosBOF -2 Indicates that the current record pointer is at BOF (that is, the BOF property is True).
adPosEOF -3 Indicates that the current record pointer is at EOF (that is, the EOF property is True).
adPosUnknown -1 Indicates that the Recordset is empty, the current position is unknown, or the provider does not support the AbsolutePage or AbsolutePosition property.

Sets

Integer
value to move to a record based on its ordinal position in the Recordset object.

Description

Sets or gets the AbsolutePosition property of the wrapped ADODB.Recordset object. Use the AbsolutePosition property to move to a record based on its ordinal position in the Recordset object, or to determine the ordinal position of the current record. The provider must support the appropriate functionality for this property to be available. Like the AbsolutePage property, AbsolutePosition is 1-based and equals 1 when the current record is the first record in the Recordset. You can obtain the total number of records in the Recordset object from the RecordCount property .

Recordset.Bookmark

Syntax

b=Recordset.Bookmark
Recordset.Bookmark=b

Sets or gets

Float
value that indicates a bookmark that uniquely identifies the current record in a Recordset object.

Description

Sets or gets the Bookmark property of the wrapped ADODB.Recordset object. Use the Bookmark property to save the position of the current record and return to that record at any time. Bookmarks are available only in Recordset objects that support bookmark functionality.

Recordset.Sort

Syntax

put Recordset.Sort
Recordset.Sort="lastName DESC, firstName ASC"

Sets or gets

String
value that indicates one or more field names on which the Recordset is sorted, and whether each field is sorted in ascending or descending order.

Description

Sets or gets the Sort property of the wrapped ADODB.Recordset object. This property requires the CursorLocation property to be set to adUseClient. A temporary index will be created for each field specified in the Sort property if an index does not already exist. The sort operation is efficient because data is not physically rearranged, but is simply accessed in the order specified by the index. Setting the Sort property to an empty string will reset the rows to their original order and delete temporary indexes.

Suppose a Recordset contains three fields named firstName, middleInitial, and lastName. Set the Sort property to the string, "lastName DESC, firstName ASC", which will order the Recordset by last name in descending order, then by first name in ascending order.

Recordset.Filter

Syntax

put Recordset.Filter
Recordset.Filter="LastName = 'Smith' AND FirstName = 'John'"

Sets or gets

String
Criteria string — a string made up of one or more individual clauses concatenated with AND or OR operators.
 
Integer
value that specifies the group of records to be filtered from a Recordset. It can be one of the following values:
Constant Value Description
adFilterAffectedRecords 2 Filters for viewing only records affected by the last Delete, Resync, UpdateBatch, or CancelBatch call.
adFilterConflictingRecords 5 Filters for viewing the records that failed the last batch update.
adFilterFetchedRecords 3 Filters for viewing the records in the current cache—that is, the results of the last call to retrieve records from the database.
adFilterNone 0 Removes the current filter and restores all records for viewing.
adFilterPendingRecords 1 Filters for viewing only records that have changed but have not yet been sent to the server. Applicable only for batch update mode.

Description

Sets or gets the Filter property of the wrapped ADODB.Recordset object. Use the Filter property to selectively screen out records in a Recordset object. The filtered Recordset becomes the current cursor.

Recordset.CacheSize

Syntax

put Recordset.CacheSize
Recordset.CacheSize=10

Sets or gets

Integer
value that indicates the number of records from a Recordset object that are cached locally in memory.

Description

Sets or gets the CacheSize property of the wrapped ADODB.Recordset object. Use the CacheSize property to control how many records the provider keeps in its buffer and how many to retrieve at one time into local memory.

Recordset.MaxRecords

Syntax

put Recordset.MaxRecords
Recordset.MaxRecords=10

Sets or gets

Integer
value that indicates the maximum number of records to return to a Recordset from a query.

Description

Sets or gets the MaxRecords property of the wrapped ADODB.Recordset object. Use the MaxRecords property to limit the number of records that the provider returns from the data source. The default setting of this property is zero, which means the provider returns all requested records. The MaxRecords property is read/write when the Recordset is closed and read-only when it is open.

©2001 Eugene Shoustrov www.adoxtra.com Built on April 4, 2001