Pls, am having an error code when inserting data into Access database. It keeps saying there's sytank error in my INSERT INTO statement. Can any one help me to solve this.
Here is the code
- try {
- OleDbConnection connection = new OleDbConnection(@"Provider = Microsoft.ACE.OLEDB.12.0; Data Source = C:\Users\DELL\Documents\EmployeesData.accdb;
- Persist Security Info = false;");
- connection.Open();
- OleDbCommand cmd = new OleDbCommand("insert into EmployeeInfo (UserName, Password)values('" + UserText.Text + "', '" + PassText.Text + "')", connection);
- cmd.ExecuteNonQuery();
- MessageBox.Show("Inserted");
- }
- catch (Exception ex)
- {
- MessageBox.Show("Failed" + ex.ToString());
- }

Bikesh SrivastavaPosted Jul 11, 2016, 7:01 AM
ketan borsdiyaPosted Jul 12, 2016, 1:29 AM
Vignesh ManiPosted Jul 11, 2016, 5:51 PM
Oyetoke TobyPosted Jul 11, 2016, 12:16 PM
Bikesh Srivastava
ketan borsdiyaPosted Jul 11, 2016, 6:55 AM
Oyetoke TobyPosted Jul 11, 2016, 6:37 AM
Bikesh SrivastavaPosted Jul 11, 2016, 6:10 AM
Nitin SontakkePosted Jul 11, 2016, 5:49 AM
Manas MohapatraPosted Jul 11, 2016, 5:47 AM
Oyetoke TobyPosted Jul 11, 2016, 5:46 AM
Vineet KumarPosted Jul 11, 2016, 5:41 AM