0

"Operation must use an updateable query".

I have an old application with an Access database (Access 2003), but the front end is written in C#.NET (4.5).

The database is over 10 years old, and the C# front-end has worked fine for around 7 years. I wrote it myself, so I am familiar with the internals.

Within the last two weeks, I have started getting the error listed above whenever any attempt to update or insert rows occurs. I had made no changes to the program in over 2 years.

I thought, "no problem, I am a programmer, I'll debug it". Interestingly, when I run inside visual studio, the program works fine. I get no errors. But even after recompiling, then upgrading from VS2010 to VS2012 and form .NET 4.0 to .NET 4.5, I continue to get the error above unless I am running inside Visual Studio. Note: this is not a web application. It is a stand-alone windows application.

I have done a google search and have found other cases where people are getting this same error, but none seem to match the problem I am having.

All my rows have primary keys that are auto-increment.

Any help would be appreciated.

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418
Randy Rowell
  • 37
  • 1
  • 1
  • 5
  • Have you double-checked that you're hitting the exact same database file while debugging? (Re: the common "database in the same folder as the .exe" problem that manifests itself after deployment.) Is the database file on a network share? If so, is it a real Windows SMB share or could it be a third-party file sharing appliance that might be running Linux (specifically Samba)? Done a Compact and Repair on the database and then verified that no Primary Key indexes have been inadvertently dropped as a result? (I've seen that with Samba shares.) – Gord Thompson Jan 14 '17 at 18:48
  • Thanks for the thoughts. There has been no compact and repair. I did go back and check primary keys. Not on all tables, but on a few specific tables before trying a specific operation on just that table. The database is accessed via ODBC connection and is definitely hitting the same place. When I run through VS it works. But when I run the recently compiled version from the exact same location that VS would get it, it does not work. – Randy Rowell Jan 14 '17 at 21:36
  • Update: This seems to have something to do with Access 2003 no longer being supported. I am in the process of converting the database to MS SQL since that get be attained for free. – Randy Rowell May 10 '17 at 17:00

0 Answers0