JavaScript Editor js editor     Web development 



Main Page

Specifies the data source to use for the InsertCmd property. Read/write at design time and run time.

Note:
The CursorAdapter InsertCmdDataSourceType property determines how the InsertCmdDataSource property is used.

CursorAdapter.InsertCmdDataSource [= cDataSource]

Return Value

cDataSource


Character data type. The cDataSource parameter specifies the data source used by the InsertCmd property.

Remarks

Applies To: CursorAdapter Class

The following table describes behaviors that apply to InsertCmdDataSource depending on the value of InsertCmdDataSourceType.

InsertCmdDataSourceType InsertCmdDataSource behavior

Empty ("")

InsertCmdDataSource is disregarded. Visual FoxPro uses the data source in the CursorAdapter DataSource property.

However, if the cursor associated with the CursorAdapter object is based on an ActiveX Data Object (ADO) RecordSet, Visual FoxPro uses the functionality of the ADO RecordSet to insert the record. To use this functionality, make sure the CursorAdapterDataSourceType property is set to "ADO".

"ADO"

InsertCmdDataSource must be set to a valid ADO Command object. The ActiveConnection property of the ADO Command object must be set to a valid and open ADO Connection object.

Visual FoxPro sets the CommandText property of the ADO Command object to the value of the CursorAdapter InsertCmd property. Visual FoxPro parses the command for parameters, creates parameter values if found, and sets them in the Command object.

The insert operation occurs as:

В Copy Code
CursorAdapter.InsertCmdDataSource.Execute()

For more information about using an ADO RecordSet, automatic updating, and generating SQL commands automatically, see Data Access Management Using CursorAdapters.

"XML"

Visual FoxPro disregards the CursorAdapter DataSource property.

See Also



JavaScript Editor js editor     Web development