The ConnectionString property of an object of ClassType clsDatasource returns a string containing the OLE DB initialization parameters for the source database.
String (OLE DB connection string)
Read/write
For more information about valid connection string parameters and format, see the OLE DB documentation or the source database documentation.
'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 metadata repository
dsoDatasource.Update