moMoney2009
Programmer
I'm just trying to update the actual database to reflect the changes that occur in my software. I am using the automated DataSet builder and adapter classes that VS 05 will generate for ease of use.... but I must be missing something rudimentary. can anyone shed some light on what I'm missing?
Code:
private void deleteBtn_Click(object sender, EventArgs e)
{
if ((row != NOT_SELECTED) && (col != NOT_SELECTED))
{
string[] param = new string[7];
for (int column = 0; col < param.Length; col++)
param[column] = (string)customerGrid[column, row].Value;
[COLOR=green]/*string fName = (string)customerGrid[0,row].Value;
string lName = (string)customerGrid[1, row].Value;
string addr = (string)customerGrid[2, row].Value;
string zip = (string)customerGrid[3, row].Value;
string city = (string)customerGrid[4, row].Value;
string state = (string)customerGrid[5, row].Value;
string pNum = (string)customerGrid[6, row].Value;
MessageBox.Show(fName + " " + lName + " " + addr + " " + zip + " " + city + " " + state + " " + pNum);
this.customersTableAdapter.MyDeleteQuery(fName, lName, addr, zip, city, state, pNum);*/[/color]
this.customersTableAdapter.MyDeleteQuery(param[0], param[1], param[2], param[3], param[4], param[5], param[6]);
this.customersTableAdapter.Fill(this.automatic_IceDataSet.Customers);
[COLOR=green]//WTF???????????????
//tried both versions to update actual database[/color]
[COLOR=blue]this.customersTableAdapter.Update(automatic_IceDataSet.Customers);
this.customersBindingSource.DataSource = (DataSet)this.automatic_IceDataSet;[/color]
}
}