I am working through the C# tutorial from Hoome and learn. I am able to read records OK, but when I atempt to update an access database I get an error. The database is not read only,
Error:
System.Data.OleDb.OleDbException was unhandled
HResult=-2147467259
Message=Operation must use an updateable query.
private void btnSave_Click(object sender, EventArgs e)
{
System.Data.OleDb.OleDbCommandBuilder cb;
cb = new System.Data.OleDb.OleDbCommandBuilder(da);
DataRow dRow = ds1.Tables["Workers"].NewRow();
dRow[1] = textBox1.Text;
dRow[2] = textBox2.Text;
dRow[3] = textBox3.Text;
ds1.Tables["Workers"].Rows.Add(dRow);
MaxRows = MaxRows + 1;
inc = MaxRows - 1;
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Workers.mdb";
da.Update(ds1, "Workers");
MessageBox.Show("Entry added");
}