ConnectionString (clsDataSource)
Ostrzeżenie
Ta funkcja zostanie usunięta z następnej wersji programu Microsoft SQL Server. Nie należy stosować tej funkcji w nowych projektach oraz jak najszybciej należy zmodyfikować aplikacje, w których obecnie jest używana ta funkcja.
The ConnectionString property of an object of ClassType clsDataSource returns a string containing the OLE DB initialization parameters for the source database.
Typ danych
String
Dostęp
Odczyt i zapis
Uwagi
Aby uzyskać więcej informacji na temat parametry ciąg prawidłowe połączenie i format można znaleźć w dokumentacji OLE DB lub źródłowa baza danych dokumentacji.
Przykład
Użyć następującego kodu do zestaw ConnectionString dla właściwość clsDataSource obiektu.
'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