oussouss

oussouss


  • Name: [not set]
  • Favorite Languages: [not set]
  • Website: [not set]
  • Location: [not set]
  • About Me: [not set]

Recent Comments

  • C# Tutorial - Binding a DataGridView to a Database
    05/02/2010 - 06:12

    hello i have a function that return a dataset :

    public DataSet dataSetReq(string myQuery,string myTab)
    {

    myCommand = new OleDbCommand(myQuery, myConnection); //ExecuteSEL(myQuery)
    dAdapter = new OleDbDataAdapter(myCommand);
    OleDbCommandBuilder cBuilder = new OleDbCommandBuilder(dAdapter);

    mydSet = new DataSet(myTab);

    dReader = myCommand.ExecuteReader();
    dReader.Close();
    dAdapter.Fill(mydSet,myTab);
    return mydSet;
    }

    and i have a piece of code in the onclick event of my botton :
    BindingSource bSource = new BindingSource();
    bSource.DataSource = DecGlob.GstBD.dataSetReq(DecGlob.Req, "Fournisseur").Tables[0];
    this.dataGridViewFour.DataSource = bSource;
    DecGlob.GstBD.dAdapter.Update(DecGlob.GstBD.dataSetReq(DecGlob.Req, "Fournisseur"), "Fournisseur");
    the update deosn't work please help me !!!