Specifies the control's data as an array, XML, ADO or DAO.
Type
Description
Variant
A VARIANT expression that could be a string, an object as explained bellow.
The control can automatically handle Array, XML, ADO, DAO, DataSet through the
DataSource properties ( control and view objects ). You can specify
the data source for the entire control through the DataSource property,
or for a particular view using View.DataSource property. If an internal
error occurs while using the DataSource property the Error event
occurs. You can use the control's DataSource
property to assign a data source for all views.
For instance,
"...\sample.xml" opens the
sample.xml file
"...\sample.dbf" opens the
specified sample.dbf table
"Data Member=SELECT * FROM Orders ; Data
Source=...\sample.accdb", opens the Orders table of the
specified sample.accdb database
"Data Member=SELECT * FROM Orders ; Data
Source=...\sample.mdb", opens the Orders table of the
specified sample.mdb database
"Data Member=Orders ; Driver={Microsoft Access Driver (*.mdb)}
; DBQ=...\sample.mdb", opens the Orders table of sample.mdb
database, using ODBC
"Data Member=Orders ; Driver={Microsoft Access Driver (*.mdb)}
; DBQ=...\sample.mdb", opens the Orders table of sample.mdb
database, using ODBC
"Data Member=SELECT * FROM [Sheet1$] ;
Driver={Microsoft Excel Driver (*.xls)} ; DBQ=...\sample.xls ; DriverID=790" reads
the Sheet1 worksheet of the sample.xml file ( Excel )
where ... indicates the full path to the sample file.