Dear All I m Using Window forms using c# server side code .
using access database . i add app config file in this app config i cretae this connection
<add name="ROMS.Properties.Settings.DBRomsConnectionString" connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Resources\DBRoms.mdb;Persist Security Info=True" providerName="System.Data.OleDb" />
Than i call this directly form.cs file
OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\USER\Desktop\ROMS\ROMS\ROMS\Resources\DBRoms.mdb");
i donot know how to call this connection string .
i get problem to insert point : -
query = "INSERT INTO Employee(EmployeeID,LoginID,Department,Designation,FinYear1,FinYear2,Password,) VALUES('" + txtEmployeeId.Text + "','" + txtLoginId.Text + "','" + CBEmployeeDepartment.SelectedItem.ToString() + "','" + CBEmployeeDesignation.SelectedItem.ToString() + "','" + CBFinYear1.SelectedItem.ToString() + "','" + CBFinYear2.SelectedItem.ToString() + "','" + txtEmployeePassword.Text + "')";
con.Open();
cmd = new OleDbCommand(query, con);
cmd.ExecuteNonQuery();
con.Close();
I get error in Execute nonquery .
all data field value is text .