adoFldParmGet
Previous Topic  Next Topic 

Synopsis:

       adoFldParmGet(handle,ix/name,ParmID,pValue)

Arguments:

       handle        - The recordset handle.

       ix/name        - The field index number or name

       parmID        - The parameter ID

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


Description:   This function enables the underlying field parameters to be examined for the field defined by the field index number (ix) or field name in 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_FLD_ACTUALSIZE                =201;        #Returns the actual length of a field's value

const P_FLD_ATTRIBUTES                =202;        #Sets or returns the attributes of a Field object

const P_FLD_DEFINEDSIZE                =203;        #Returns the defined size of a field

const P_FLD_NAME                        =204;        #Sets or returns the name of a Field object

const P_FLD_NUMERICSCALE                =205;        #Sets or returns the number of decimal places allowed for numeric values in a Field object

const P_FLD_ORIGINALVALUE                =206;        #Returns the original value of a field

const P_FLD_PRECISION                        =207;        #Sets or returns the maximum number of digits allowed when representing numeric values in a Field object

const P_FLD_STATUS                        =208;        #Returns the status of a Field object

const P_FLD_TYPE                        =209;        #Sets or returns the type of a Field object

const P_FLD_UNDERLYINGVALUE        =210;        #Returns the current value of a field

const P_FLD_VALUE                        =211;        #Sets or returns the value of a Field object 



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


Property

Readable

Writeable

Description

ActualSize


Returns the actual length of a field's value

Attributes

Sets or returns the attributes of a Field object

DefinedSize


Returns the defined size of a field

Name

Sets or returns the name of a Field object

NumericScale

Sets or returns the number of decimal places allowed for numeric values in a Field object

OriginalValue


Returns the original value of a field

Precision

Sets or returns the maximum number of digits allowed when representing numeric values in a Field object

Status


Returns the status of a Field object

Type

Sets or returns the type of a Field object

UnderlyingValue


Returns the current value of a field

Value

Sets or returns the value of a Field object


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()