Datagridview problem. fill & update

Oct 29 2010 3:56 PM
Hello everybody. I have form which getting data from table 'Selling' in this table is next columns
 ID - int (have primary key)
BarCode - varchar(100)
ArtNumber - varchar(100)
ProductName - varchar(100)
Price - money
SelfPrice - money
PriceWithOutAWD - money
Comment - nvarchar(50)
DateTime - datetime
Quantity - nvarchar(50)


DataGridView DataSource is sellingBindingSource1. In this for is toolStripMenu with button this button

 private void TsmRefresh_Click(object sender, EventArgs e)
{ sqlDataAdapter1.Fill(dataSet11); }

when i press this button it does not refresh it dublicates same data
next button gets this error Failed to convert parameter value from a String to a Int32. this is button:
Collapse
 private void TsmUpdate_Click(object sender, EventArgs e
{
sqlDataAdapter1.Update(dataSet11);
}

so my datagridview have problems. Does anybody knows where is problem?
When this form is loading this code works fine :
 
 private void TradeLog_Load(object sender, EventArgs e)  
{
sqlDataAdapter1.Fill(dataSet11);
}
Thanks


Answers (1)