Mon formulaire appelle plusieurs objets TableAdapter
pour remplir un DataSet
local commun avec des lignes pertinentes (voir ci-dessous).Partager SqlConnexion entre les TableAdapters
private void frm_TrialsFromOrder_Load(object sender, EventArgs e)
{
this.trialTableAdapter.FillBy(this.myDataSet.trialTable, this.trial_id);
this.orderTableAdapter.FillBy(this.myDataSet.orderTable, this.order_id);
}
Lors de l'exécution du programme, le Générateur de profils SQL Server montre:
- Audit Logon
- SQL: Lot (SELECT ... FROM trialTable ...)
- Audit Logoff
- Audit Ouverture de session
- SQL: lot (SELECT ... FROM orderTable ...)
- Au dit Logoff
Comment puis-je configurer plusieurs objets TableAdapter
pour utiliser le même SqlConnection
?