次の方法で共有


DataSource Property (Visual FoxPro)

Specifies the data source for DataEnvironment and CursorAdapter objects to use. The DataEnvironment or CursorAdapter DataSourceType 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 CursorAdapter DataSourceType is "Native", specifying CursorAdapter DataSource is not required because the cursor returned by the CursorAdapter SelectCmd property is the default data source. The name of the cursor returned is determined by the CursorAdapter Alias property, which is set by the CursorAdapter CursorFill method.

If the CursorAdapter InsertCmdDataSourceType, UpdateCmdDataSourceType, and DeleteCmdDataSourceType properties are empty, the CursorAdapter DataSource property overrides the CursorAdapter InsertCmdDataSource, UpdateCmdDataSource, and DeleteCmdDataSource properties.

If the CursorAdapter UseDeDataSource property is True (.T.), the DataEnvironment DataSource 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)