|
Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte.
|
Traduction
Source
|
Procédure d'accès à des sources de données externes
Remarque
|
|---|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Instantiate a variable to access the specified data source // from the DataSourceCollection of the form. DataSource myDataSource = this.DataSources["Employees"]; // Display the XML data from the secondary data source. MessageBox.Show("Data source data: " + myDataSource.CreateNavigator().InnerXml.ToString());
// Instantiate a variable to access the specified data connection // from the DataConnectionCollection of the form. // You must cast to the specific data connection type // (ADOQueryConnection) before you can access the data connection. ADOQueryConnection myADOConnection = (ADOQueryConnection)this.DataConnections["Employees"]; // Display the connection information for the data connection. MessageBox.Show("Connection string: " + myADOConnection.Connection);
Remarque