Salut,
Je fais un stage et c'est le premiere fois que je fais du C#
et j'ai un soucie, c'est qu'il ne m'afiche pas la requete que je lui passe dans le "oleDbSelectCommand1"
je ne comprend pas
quelqu'un pourais me donner un exemple tres tres simple d'utilisation d'un datagrad avec son systeme de connection car je ne comprend rine du tous
merci
//
// tableEqui
//
this.tableEqui.DataMember = "";
this.tableEqui.DataSource = this.dataSet11.ComposeEquip;
this.tableEqui.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.tableEqui.Location = new System.Drawing.Point(16, 16);
this.tableEqui.Name = "tableEqui";
this.tableEqui.Size = new System.Drawing.Size(360, 96);
this.tableEqui.TabIndex = 0;
//
// oleDbDataAdapter1
//
this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1;
this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1;
this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "ComposeEquip", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("IdEquipement", "IdEquipement"),
new System.Data.Common.DataColumnMapping("IdEtalon", "IdEtalon"),
new System.Data.Common.DataColumnMapping("IdGroupe", "IdGroupe"),
new System.Data.Common.DataColumnMapping("IdComposeEquip", "IdComposeEquip")})});
this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1;
//
// oleDbSelectCommand1
//
this.oleDbSelectCommand1.CommandText = "SELECT IdEquipement, IdEtalon, IdGroupe, IdComposeEquip FROM ComposeEquip";
this.oleDbSelectCommand1.Connection = this.oleDbConnection1;
//
// oleDbConnection1
//
this.oleDbConnection1.ConnectionString = @"Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Database Password=;Data Source=""C:\Documents and Settings\RT80031\Desktop\PVE - V2\PV.mdb"";Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk Transactions=1;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;Extended Properties=;Mode=ReadWrite;Jet OLEDB:New Database Password=;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Encrypt Database=False";
//
// dataSet11
//
this.dataSet11.DataSetName = "DataSet1";
this.dataSet11.Locale = new System.Globalization.CultureInfo("fr-FR");