im doing a project and i want to add a record to an accdb using a windows forms application on c# i have got what appears to be code that works i.e. it doesnt show any errors and appears to run however it doesnt add the record il post the code any ideas or help would be much appreciated
private void confirmbut_Click(object sender, EventArgs e)
{
OleDbConnection Conn = new OleDbConnection (
"Provider=Microsoft.ACE.OLEDB.12.0; Data Source= H:\\VRUSLTD\\VRUS.accdb");
OleDbCommand Cmd = new OleDbCommand
("INSERT INTO Rental_Details(RentalID,Reg_No,CustID,StaffMember,PickUpDate,PickUpTime,Due_Back,DaysRental) SELECT '" +
rentIDtb.Text + "','" + vehIDtb.Text + "','" + custIDtb + "','" + empIDtb + "','" + pickuptb + "','" + picktimetb + "','" + returntb + "','" + daystb + "';", Conn);
}
items names with tb at the end of there names are textboxes eg returntb , days tb