Oki je t'ai contacté mais si d'autres souhaite discuter de c# ou de .Net ils sont bienvenus sur msn : gouin_g@msn.com
-------------------------------
Réponse au message :
-------------------------------
> Je suis entierement d'accord avec toi. Ps si tu le souhaite je suis sur msn : nicoo00@hotmail.com ou icq : 133102705
> a++
>
>
> -------------------------------
> Réponse au message :
> -------------------------------
>
> >
> >
> > Pas de problème, ce sera avec plaisir car le gros soucis sur les docs c'est que les exemples sont toujours 100 fois trop complexes (en tout cas à mon gout) c'est gonflant de passer 4h à trouver qq de simple et d'explicite !
> >
> > -------------------------------
> > Réponse au message :
> > -------------------------------
> >
> > >
> > >
> > >
> > > Je suis loin d'etre expert la dedans mais bon quand j'ai du chercher pour moi il y avait que ca qui prennait donc voila. Si tu as plus d'infos sur les bds on peut tjs s'echanger si tu veux ???
> > >
> > > a++
> > > -------------------------------
> > > Réponse au message :
> > > -------------------------------
> > >
> > > > C'est nickel ça fonctionne super bien, mais pourquoi le "dataGrid.SetDataBinding(oDS, "Employés"); " fonctionne avec une bd Sql et pas access ? car ce code est un code pour bd sql que j'ai voulu adapter pour access et la je ne comprends pas.
> > > > En tout cas merci !!

> > > >
> > > >
> > > >
> > > > -------------------------------
> > > > Réponse au message :
> > > > -------------------------------
> > > >
> > > > > essaie un peu la commande suivante :
> > > > >
> > > > >
> > > > > dataGrid1.DataSource = oDS.Tables[0]; > > > > > |
> > > > >
> > > > > parce que j'ai pas confiance en ton
> > > > >
> > > > >
> > > > >
> > > > > dataGrid.SetDataBinding(oDS, "Employés"); > > > > > |
> > > > >
> > > > > Donne moi le resultat de ton changement merci !
> > > > >
> > > > > -------------------------------
> > > > > Réponse au message :
> > > > > -------------------------------
> > > > >
> > > > > > Donc le soucis se situe à ligne du dataGrid, enfin c là que l'erreur est affichée : Impossible de créer une liste enfant pour Employés.
> > > > > > Si quelqu'un pouvait m'aider.....m'aiguiller ;-) Merci d'avance
> > > > > >
> > > > > >
> > > > > >
> > > > > > using System;
> > > > > > using System.Windows.Forms;
> > > > > > using System.Data;
> > > > > > using System.Data.OleDb;
> > > > > >
> > > > > > public class DisplayTabularData : System.Windows.Forms.Form
> > > > > > {
> > > > > > private System.Windows.Forms.Button retrieveButton;
> > > > > > private System.Windows.Forms.DataGrid dataGrid;
> > > > > > public DisplayTabularData()
> > > > > > {
> > > > > > this.AutoScaleBaseSize = new System.Drawing.Size(5,13);
> > > > > > this.ClientSize = new System.Drawing.Size(464, 253);
> > > > > > this.Text = "01_DisplayTabularData";
> > > > > > this.dataGrid = new System.Windows.Forms.DataGrid();
> > > > > > dataGrid.BeginInit();
> > > > > > dataGrid.Location = new System.Drawing.Point(8,8);
> > > > > > dataGrid.Size = new System.Drawing.Size(448,208);
> > > > > > dataGrid.TabIndex = 0;
> > > > > > dataGrid.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
> > > > > > this.Controls.Add(this.dataGrid);
> > > > > > dataGrid.EndInit();
> > > > > > this.retrieveButton = new System.Windows.Forms.Button();
> > > > > > retrieveButton.Location = new System.Drawing.Point(384,224);
> > > > > > retrieveButton.Size = new System.Drawing.Size(75, 23);
> > > > > > retrieveButton.TabIndex = 1;
> > > > > > retrieveButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
> > > > > > retrieveButton.Text = "Rafraichir";
> > > > > > retrieveButton.Click += new System.EventHandler(this.retrieveButton_Click);
> > > > > > this.Controls.Add(this.retrieveButton);
> > > > > > }
> > > > > > protected void retrieveButton_Click(object sender, System.EventArgs e)
> > > > > > {
> > > > > >
> > > > > > String connStr = "provider=Microsoft.Jet.OLEDB.4.0;Data Source=mybase.mdb";
> > > > > > String selStr ="SELECT [Nom] from Employés";
> > > > > > OleDbDataAdapter oDA= new OleDbDataAdapter (selStr,connStr);
> > > > > > DataSet oDS = new DataSet();
> > > > > > oDA.Fill(oDS);
> > > > > > dataGrid.SetDataBinding(oDS, "Employés");
> > > > > > }
> > > > > > static void Main()
> > > > > > {
> > > > > >
> > > > > > Application.Run(new DisplayTabularData());
> > > > > > }
> > > > > >
> > > > > >
> > > > > >
> > > > > > }
> > > > >
> > > >
> > >
> >
>