Hi Guys,
Right... I've managed to run select statements with associated Joins to show the data I want in DGV's which is great. Seems to be working fine.
I'm not to the point where I need to be able to Insert, Update & Delete Rows in my Database. I am guessing If I can nail down one of these the others shoul fall into place with some tweaking of the code.
The Code I've written uses the 'CommandBuilder' object to try and re-establish a connected to the DB. Whilst Debugging the Values seem to be passed correclty (See Screenshot attached) but I get an error stating the Connection has not been initalised (See Screenshot).
The Code I am currently using is below:
System.Data.OleDb.OleDbCommandBuilder cb;
cb = new OleDbCommandBuilder(da);
DataRow dRow = ds.Tables["cashCustomers"].NewRow();
dRow[1] = txtAccRef.Text;
dRow[2] = txtAccName.Text;
dRow[3] = txtAccAddr1.Text;
dRow[4] = txtAccAddr2.Text;
dRow[5] = txtAccTown.Text;
dRow[6] = txtAccPostCode.Text;
dRow[7] = txtAccCounty.Text;
ds.Tables["cashCustomers"].Rows.Add(dRow);
da.Update(ds, "cashCustomers");
MessageBox.Show("Account Added");
Thank you for and help in Advance.
Regards
Mark.