adoRSetParmGet
Previous Topic  Next Topic 

Synopsis:

       adoRSetParmGet(handle,parmID,&Value)

Arguments:

       handle        - The recrodset handle.

       parmID        - The parameter ID

       pValue        - Pointer to the variable that will hold the parameter value


Description:   This function enables the underlying recordset parameters to be examined for the recordset defined by handle.     The parmID argument is the ID of the parameter that is to be read and the pValue is a pointer to a variable that will hold the returned parameter value.       The parmID should be set to one of the following values as defined in the ado.inc file supplied with the library as follows:


const P_RS_ABSOLUTEPAGE        =1;        # Sets or returns a value that specifies the page number in the Recordset object

const P_RS_ABSOLUTEPOSITION=2;        #Sets or returns  the ordinal position of the current record in the Recordset object

const P_RS_ACTIVECOMMAND        =3;        #Returns the Command object associated with the Recordset

const P_RS_ACTIVECONNECTION=4;        # Unreadable/unsettable from the cxado.dll library

const P_RS_BOF                        =5;        #Returns true if the current record position is before the first record, otherwise false

const P_RS_BOOKMARK                =6;        #Sets or returns a bookmark. The bookmark saves the position of the current record

const P_RS_CACHESIZE                =7;        #Sets or returns the number of records that can be cached

const P_RS_CURSORLOCATION        =8;        #Sets or returns the location of the cursor service

const P_RS_CURSORTYPE        =9;        #Sets or returns the cursor type of a Recordset object

const P_RS_DATAMEMBER        =10;        #Sets or returns the name of the data member that will be retrieved

const P_RS_DATASOURCE        =11;        # Unreadable/unsettable from the cxado.dll library

const P_RS_EDITMODE                =12;        #Returns the editing status of the current record

const P_RS_EOF                        =13;        #Returns true if the current record position is after the last record, otherwise false

const P_RS_FILTER                =14;        #Sets or returns a filter for the data in a Recordset object

const P_RS_INDEX                =15;        #Sets or returns the name of the current index for a Recordset object

const P_RS_LOCKTYPE                =16;        #Sets or returns the type of locking when editing a record in a Recordset

const P_RS_MARSHALOPTIONS        =17;        # Sets or returns a value that specifies which records are to be returned to the server

const P_RS_MAXRECORDS                =18;        # Sets or returns the maximum number of records to return to a Recordset object from a query

const P_RS_PAGECOUNT                =19;        # Returns the number of pages with data in a Recordset object

const P_RS_PAGESIZE                =20;        # Sets or returns the maximum number of records allowed on a single page of a Recordset object

const P_RS_RECORDCOUNT        =21;        # Returns the number of records in a Recordset object

const P_RS_SORT                        =22;        # Sets or returns the field names in the Recordset to sort on

const P_RS_SOURCE                =23;        # Sets a string value or a Command object reference, or returns a String value that indicates the data source of the Recordset object

const P_RS_STATE                =24;        #Returns a value that describes if the Recordset object is open, closed, connecting, executing or retrieving data

const P_RS_STATUS                =25;        #Returns the status of the current record with regard to batch updates or other bulk operations

const P_RS_STAYINSYNC                =26;        # Sets or returns whether the reference to the child records will change when the parent record position changes


The above constants map one-to-one with the corresponding underlying properties from the ADO _Recordset object as shown below:


Property

Readable

Writeable

Description

AbsolutePage

Sets or returns a value that specifies the page number in the Recordset object

AbsolutePosition

Sets or returns a value that specifies the ordinal position of the current record in the Recordset object

ActiveCommand


Returns the Command object associated with the Recordset

ActiveConnection



Sets or returns a definition for a connection if the connection is closed, or the current Connection object if the connection is open

BOF


Returns true if the current record position is before the first record, otherwise false

Bookmark

Sets or returns a bookmark. The bookmark saves the position of the current record

CacheSize

Sets or returns the number of records that can be cached

CursorLocation

Sets or returns the location of the cursor service

CursorType

Sets or returns the cursor type of a Recordset object

DataMember

Sets or returns the name of the data member that will be retrieved from the object referenced by the DataSource property

DataSource



Specifies an object containing data to be represented as a Recordset object

EditMode


Returns the editing status of the current record

EOF


Returns true if the current record position is after the last record, otherwise false

Filter

Sets or returns a filter for the data in a Recordset object

Index

Sets or returns the name of the current index for a Recordset object

LockType

Sets or returns a value that specifies the type of locking when editing a record in a Recordset

MarshalOptions

Sets or returns a value that specifies which records are to be returned to the server

MaxRecords

Sets or returns the maximum number of records to return to a Recordset object from a query

PageCount


Returns the number of pages with data in a Recordset object

PageSize

Sets or returns the maximum number of records allowed on a single page of a Recordset object

RecordCount


Returns the number of records in a Recordset object

Sort

Sets or returns the field names in the Recordset to sort on

Source

Sets a string value or a Command object reference, or returns a String value that indicates the data source of the Recordset object

State


Returns a value that describes if the Recordset object is open, closed, connecting, executing or retrieving data

Status


Returns the status of the current record with regard to batch updates or other bulk operations

StayInSync

Sets or returns whether the reference to the child records will change when the parent record position changes


[See the Microsoft ADO Reference Libary for more details].


Note that some of the parameters are read-only and some of them can't be read or written at all by the CXADO.DLL libarary.   


Also, for some of the parameters, there are utility functions which can provide another mechanism for getting the value of the parameter.     specifically for the _Recordset parameters there are the following utility functions defined:


adoRSetIsEOF(handle)

adoRSetIsBOF(handle)

adoRSetState(handle)


Which allow for the equivalent parameters from the set above to be quickly read.



Returns:   Returns 0 upon success or a negative error code.   If ADOERR_COMERR is returned, then the underlying ADO error can be obtained by calling adoLastError()