ConversionFunc Property
Specifies a comma-delimited list of field and function name pairs separated by single spaces. Read/write at design time and run time.
Note
ConversionFunc applies only when using automatic updating. ConversionFunc is not evaluated at design time.
Use ConversionFunc to specify native Visual FoxPro or custom conversion functions that are applied to one or more cursor fields before sending them to the data source through an update, insert, or delete operation. The actual values sent to the data source are the values returned by the function associated with each field.
CursorAdapter.ConversionFunc [ = 'cFieldName1 cFuncName1 [, cFieldName2 cFuncName2 ]...' ]
Return Value
- cFieldName
Specifies a field name.
cFuncName
Specifies a function name that accepts a field value as the first parameter. The specified function or method must accept the associated field name as the sole parameter.Note
Do not include parentheses at the end of the function or method name.
Remarks
Applies To: CursorAdapter Class
If the local cursor contains character fields that are used as part of the WHERE clause for an automatically generated update command, the data source might require that the trailing spaces be removed to obtain a proper match at the data source. The following example illustrates how to remove such spaces:
CursorAdapter.ConversionFunc = "companyname TRIM, contactname TRIM"
See Also
Reference
CursorAdapter Object Properties, Methods, and Events