Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a winform with a Access database was working well until the latest Ms access update that was pushed out. I now get the (Query '' is corrupt), I don't have the access to remove the update. what my next move?

Dataset
bindingsource
datatable

Some Code

What I have tried:

C#
public Form1()
       {
           InitializeComponent();

           Refresh();
           this.dataGridView1.RowsDefaultCellStyle.BackColor = System.Drawing.Color.Bisque; // datagrid color
           this.dataGridView1.AlternatingRowsDefaultCellStyle.BackColor = System.Drawing.Color.Beige; // datagrid color

           dataGridView1.AutoResizeColumns();
           dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
       }

       private void Form1_Load(object sender, EventArgs e)
       {
           // TODO: This line of code loads data into the 'rosterDataSet.Test_Trial_Roster' table. You can move, or remove it, as needed.
           this.test_Trial_RosterTableAdapter.Fill(this.rosterDataSet.Test_Trial_Roster);
           dataGridView1.AllowUserToAddRows = false;

       }


#region Button Click

       private void btn_New_Click(object sender, EventArgs e)
       {
           try
           {
               //  Edit(true);
               rosterDataSet.Test_Trial_Roster.AddTest_Trial_RosterRow(rosterDataSet.Test_Trial_Roster.NewTest_Trial_RosterRow());
               testTrialRosterBindingSource.MoveLast();
               cb_Role.Focus();
           }
           catch (Exception ex)
           {
               MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
               rosterDataSet.Test_Trial_Roster.RejectChanges();
           }
       }

       private void btn_Save_Click(object sender, EventArgs e)
       {
           try
           {
               //  Edit(false);
               testTrialRosterBindingSource.EndEdit();
               test_Trial_RosterTableAdapter.Update(rosterDataSet.Test_Trial_Roster);
               dataGridView1.Refresh();


               //   maskedTextBox2.Focus();
               MessageBox.Show("You data has been Successfully saved.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
           }
           catch (Exception ex)
           {
               MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
               rosterDataSet.Test_Trial_Roster.RejectChanges();

           }
       }
Posted
Updated 2-Dec-19 11:28am
Comments
Patrice T 2-Dec-19 16:58pm    
Why don't you complain to MS ?
j snooze 2-Dec-19 17:30pm    
This link may help you out.
https://www.devhut.net/2019/11/14/access-bug-error-3340-query-is-corrupt/

1 solution

It is not a coding issue: last update introduced a bug.
If you cannot uninstall offending update, then the only thing you can do is wait for MS to publish a patch. Or, ask your system admin either to remove the update him/herself, or grant you the rights to do it.
But, unfortunately for you, there is nothing that can be done in code at this point to fix it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900