Share via


DeleteCmdDataSource Property

Specifies the data source used by the DeleteCmd property. Read/write at design time and run time.

Note   The CursorAdapterDeleteCmdDataSourceType property determines how the DeleteCmdDataSource property is used.

CursorAdapter.DeleteCmdDataSource [ = cDataSource]

Property Values

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

Remarks

The following table describes additional behaviors that apply to DeleteCmdDataSource depending on the value of DeleteCmdDataSourceType.

DeleteCmdDataSourceType DeleteCmdDataSource behavior
Empty ("") DeleteCmdDataSource is disregarded. Visual FoxPro uses the data source in the CursorAdapterDataSource property.

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 delete the record. To use this functionality, make sure the CursorAdapterDataSourceType property is set to "ADO".

"ADO" DeleteCmdDataSource 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 CursorAdapterDeleteCmd property. Visual FoxPro parses the command for parameters, creates parameter values if found, and sets them in the Command object.

The delete operation occurs as:

CursorAdapter.DeleteCmdDataSource.Execute()

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

See Also

Properties | CursorAdapter Object Properties, Methods, and Events

Applies To: CursorAdapter Class