I have a C # solution with access database that accepts SELECT, but does not accept INSERT or UPDATE, Follow insert button code:
OleDbConnection con = new OleDbConnection();
con.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;DataSource=|DataDirectory|/teste.accdb";
try
{
con.Open();
OleDbCommand cmd = new OleDbCommand();
cmd.CommandText = "INSERT INTO Tabela1 (Nome) VALUES ( @nome )";
cmd.Parameters.Clear();
cmd.Parameters.Add("@nome", OleDbType.VarChar, 50).Value = textBox1.Text;
cmd.CommandType = CommandType.Text;
cmd.Connection = con;
cmd.ExecuteNonQuery();
MessageBox.Show("Inclusão efetuada com sucesso!");
con.Close();
}
catch(Exception)
{
MessageBox.Show("Falha na inserção de registro.");
}