ConnectionString (clsDataSource)
[!附註]
下一版的 Microsoft SQL Server 將不再提供此功能。請勿在新的開發工作中使用此功能,並且儘速修改使用此功能的應用程式。
The ConnectionString property of an object of ClassType clsDataSource returns a string containing the OLE DB initialization parameters for the source database.
Data Type
String
Access
Read/write
備註
For more information about valid connection string parameters and format, see the OLE DB documentation or the source database documentation.
範例
Use the following code to set the ConnectionString property for a clsDataSource object.
'Assume an object (dsoDatasource) of ClassType clsDataSource exists
'Set the OleDB connection string.
'The connection string is used to establish the connection
'to the relational database that contains the dimension and
'fact tables. We will use OleDB provider for ODBC drivers
dsoDatasource.ConnectionString = _
"Provider=MSDASQL.1;Data Source=FoodMart;Connect Timeout=15"
'Save the datasource definition in the meta data repository
dsoDatasource.Update