Share via


DataSource Property (Visual FoxPro)

Specifies the data source for DataEnvironment and CursorAdapter objects to use. The DataEnvironment or CursorAdapterDataSourceType property determines the value of the corresponding DataSource property. Read/write at design time and run time. There are two versions of the syntax.

DataEnvironment.DataSource [= DataSource]

CursorAdapter.DataSource [= DataSource]

Return Value

  • DataSource
    Specifies a reference to an existing data source of permissible data source types. DataSource acts only as a pointer to the actual data source, which must exist at run time.

    The following table lists the values for DataSource, which depend on the value of the DataSourceType property.

    DataSource DataSourceType

    Reference to a valid ActiveX Data Object (ADO) RecordSet object

    "ADO"

    Positive integer that represents or memory variable that contains a valid Open Database Connectivity (ODBC) connection handle

    "ODBC"

    Disregarded.

    "Native", "XML", null (.NULL.), or empty string ("")

Remarks

Applies To: CursorAdapter Class | DataEnvironment Object

When the CursorAdapterDataSourceType is "Native", specifying CursorAdapterDataSource is not required because the cursor returned by the CursorAdapterSelectCmd property is the default data source. The name of the cursor returned is determined by the CursorAdapterAlias property, which is set by the CursorAdapterCursorFill method.

If the CursorAdapterInsertCmdDataSourceType, UpdateCmdDataSourceType, and DeleteCmdDataSourceType properties are empty, the CursorAdapterDataSource property overrides the CursorAdapterInsertCmdDataSource, UpdateCmdDataSource, and DeleteCmdDataSource properties.

If the CursorAdapterUseDeDataSource property is True (.T.), the DataEnvironmentDataSource and DataSourceType properties override the same CursorAdapter properties.

See Also

Reference

DataEnvironment Object Properties, Methods, and Events
CursorAdapter Object Properties, Methods, and Events
DEClass Property
DataSourceType Property

Other Resources

Properties (Visual FoxPro)