filling a table

  • Thread starter Thread starter vinnie
  • Start date Start date
V

vinnie

i made a little application. I have created the table in Sql server.

Now, i have put in my application a datagridView, i have a DataSet, a
Binding source and a Table Adapter.

I was adding the following code to the button "Edit", but i get en
error msg:

" No Overload for method 'Fill' takes '0' arguments "

The is:
private void BtnEdit_Click(object sender, EventArgs e)
{
CMSDataSet.Clear();
tbl_WorketTableAdapter.Fill();
}

what's wrong? What i should change to make it working?

Thanks
 
vinnie,

You need to pass the table adapter a DataTable to populate and then bind
to that. Your BindingSource should use the DataTable as its data source.
 
private void BtnEdit_Click(object sender, EventArgs e)
{
CMSDataSet.Clear();
tbl_WorketTableAdapter.Fill(CMSDataSet);
}

Cor
 
Back
Top