DataGrid avec access

cs_douarbou Messages postés 1 Date d'inscription mercredi 25 avril 2007 Statut Membre Dernière intervention 3 mai 2007 - 2 mai 2007 à 12:12
basmahamadeh Messages postés 1 Date d'inscription dimanche 27 mai 2007 Statut Membre Dernière intervention 27 mai 2007 - 27 mai 2007 à 23:08
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");

2 réponses

jesusonline Messages postés 6814 Date d'inscription dimanche 15 décembre 2002 Statut Membre Dernière intervention 13 octobre 2010 29
2 mai 2007 à 21:46
Bonsoir,

regarde les tutos de cette page : http://asp.net/learn/dataaccess/default.aspx?tabid=63 tout est très bien expliqué. Mais le datagrid est obsolete, utilise plutot le gridview / AccessDataSource qui est beaucoup plud simple (moins de 10 clicks)

<hr />Cyril - MSP - MCTS ASP.net & SQL
0
basmahamadeh Messages postés 1 Date d'inscription dimanche 27 mai 2007 Statut Membre Dernière intervention 27 mai 2007
27 mai 2007 à 23:08
Bonsoir,je suis etudiante en cce ,je souhaite de me rèpondre à se sujet:
la connection entre java et access database sera faite comment?
Surtout pour l'utiliser avec html.
merci
0
Rejoignez-nous