Specifies the structure of the cursor associated with a CursorAdapter object. Read/write at design time and run time.
CursorSchema is essentially the portion "between the parentheses" of the SQL CREATE TABLE and CREATE CURSOR commands. In Visual FoxPro 8.0, you can use CursorSchema to define an XML data source. In Visual FoxPro 9.0, you can use CursorSchema to define XML, Native, ADO and ODBC data sources.
Note: |
---|
In Visual FoxPro 9.0, DEFAULT values and table and field level CHECK constraints are supported for XML, Native, ADO and ODBC data sources. In Visual FoxPro 8.0, DEFAULT values and table and field level CHECK constraints are only supported for an XML data source. For the DEFAULT values and CHECK constraints to be applied to a cursor, call the CursorFill method with the lUseSchema parameter set to True (.T.). |
Visual FoxPro uses the CursorSchema property at design time to determine the structure of the cursor to place on the surface of the Data Environment Designer. Visual FoxPro uses CursorSchema at run time if specified by the CursorFill method.
Note: |
---|
You must make sure that CursorSchema matches and maps to the data source columns in an acceptable manner. |
CursorAdapter.CursorSchema [ = cList ] |
Return Value
- cList
-
Character data type. The cList parameter specifies a character string or expression that evaluates to a valid comma-delimited list of field names and types.
For example:
See the CREATE CURSOR - SQL Command for a list of field names and types. If CursorSchema is empty or set to null (.NULL.), Visual FoxPro uses the data source of the CursorAdapter object to determine the cursor structure.
В Copy Code CursorAdapter.CursorSchema = ; "col1 I, col2 Character(25), col3 M, col4 Currency, col5 n(12,3)"
Remarks
Applies To: CursorAdapter Class
When the lUseCursorSchema parameter in the CursorFill method evaluates to True (.T.), or when you add a CursorAdapter-based cursor to the surface of the Data Environment Designer, a CursorAdapter object uses CursorSchema as a template for the cursor created by CursorFill.
For ADO data sources, CursorSchema supports mapping from ADO types to Visual FoxPro data types. For more information, see Data Type Conversion Control.