Hi,
I want to update a table called title_edit,
I created 3 update queries with the designer,
now when I execute the update query in the Designer for testing,the table gets updated without p;roblems
but when I try to update it from the Form it fails to update
I have 3 multidimensional arrays & 3 comboboxes,
the comboboxes are binned with the strings in the first column and I want to save the strings from the second column to the table
private void button1_Click(object sender, EventArgs e)
{
this.Validate();
this.title_editBindingSource.EndEdit();
if (comboBox1.SelectedIndex > 0) this.title_editTableAdapter.Updatefontsize(size[1,comboBox1.SelectedIndex]);
if (comboBox2.SelectedIndex > 0) this.title_editTableAdapter.Updatefontcolor(color[1, comboBox2.SelectedIndex]);
if (comboBox3.SelectedIndex > 0) this.title_editTableAdapter.Updatefontfamily(font[1, comboBox3.SelectedIndex]);
}
private void button2_Click(object sender, EventArgs e)
{
this.Validate();
this.title_editBindingSource.EndEdit();
this.title_editTableAdapter.Updatefontsize(size[1, 3]);
this.title_editTableAdapter.Updatefontcolor("#000000");
this.title_editTableAdapter.Updatefontfamily("arial,helvetica,sans-serif");
MessageBox.Show("Loaded Default Settings");
}
both buttons dont do anything
the queries looks like this one:
UPDATE title_edit
SET fontfamily = @p3
WHERE (id = 1)
Im using VS2010