Access Database is Read Only

When I tried to open one of my main Access databases today, I got the alarming message, “The database ‘MyData’ is read-only. You won’t be able to save changes made to data or object definitions in this database.”

readonly01

I closed it, and tried to open it again, making sure that I hadn’t accidentally selected the Read Only option.

More Troubleshooting Steps

A Google search turned up some dire warnings that this could be a sign of corruption, so I created a new database, imported all the tables, queries, forms, and everything else, and all seemed well.

So, I renamed the old version, and gave the new version the same name as the previous one, so my Windows Explorer shortcuts and connections would work.

Is It Locked?

As soon as I opened the new copy of the database, the “read-only”problem was back. So, I decided to look for “.ldb” files.

When an Access database is open, it automatically creates an ldb file. This file has the same name as the database, with an “.ldb” or “.laccdb” extension. Later, when the database closes, that ldb file is automatically deleted.

  • NOTE: Access uses an ldb file to keep track of which records in the database are currently locked, and by whom. (Records are locked while someone is editing the record.) Maybe you’ve seen a “Write Conflict” warning message when you try to save a record, because someone else is changing that record, or a record close to it.
  • You can read more about these Access locking files on the Microsoft website.

Sometimes those ldb files don’t get deleted, when a database closes, and that can cause problems.

So, I looked for errant ldb files, that were mistakenly telling the database someone else had it open. There was nothing.

Connection Problem

Finally, it dawned on me — connections could be the problem.

I had an Excel file open, and it queried the database, so maybe that was the problem. I closed the Excel , re-opened the database, and it worked fine.

Later, if I tried to open the database when the Excel file was open, the database was read only.

Fix the Connection

Well, I don’t have the two files (Excel and Access) open simultaneously too often, but I wanted to have that option available.

So, I checked the connection strings for the queries and found that they included this setting:

  • Mode=Share Deny Write

I changed the setting to this instead:

  • Mode=Read

and the files now live in harmony (so far).

Where Are the Connection Strings?

To find the connection strings in Excel:

  1. Click the Data tab on the Ribbon, and then click Connections.
  2. On the Workbook Connections dialog box, click a connection name in the list
  3. Click the Properties button, to open the Connection Properties dialog box.
  4. Click the Definition tab, and edit the Connection String.
    • The strings that I edited were for Provider=Microsoft.ACE.OLEDB.12.0
    • The Mode setting might not appear in other types of connections.

Why Share This?

This information is probably of no interest to you, unless you landed here in a Google search for this error message:

  • “You won’t be able to save changes made to data or object definitions in this database”.

But, one day in the future, I might run into this error again, and maybe I’ll find my own solution when I do a Google search.

Don’t laugh — it’s happened to me before! (more than once!)

___________

Google Search Cheat Sheet

Did you know that there’s a Google search cheat sheet?

googlecheat01

Even though I spend several hours a week searching for things in Google (all of them business-related and highly intellectual), this was the first I’d heard about a cheat sheet. There are a few new (to me) tricks that should be helpful in future searches.

Special Operators

For example, you can use the ~ operator to find synonyms. If you search for "spreadsheet", a Wikipedia article on spreadsheets is at the top of the search results (after the sponsored links).

googlecheat02

Add the ~ operator, and Excel is at the top of the list, with no sponsored links.

googlecheat03 

The Google Calculator

There’s a built-in Google calculator, and did you know that you can type % of as an operator? That’s handy, and news to me!

googlecheat04

What’s New to You?

Did you know all of the items on the Google Cheat Sheet, or are some of them new to you?

___________

You Have to Sleep Eventually

When you’re self-employed, you can set your own hours, and sometimes those hours can run into the wee hours of the morning. After staring at the computer screen all day and most of the night, your eyes might be tired, but the rest of you is strangely wide awake.

If you want to make it easier to fall asleep at night, adjusting the brightness of your computer monitor might help. I downloaded a free program, f.lux,  that changes the colour of your monitor, based on the time of day, and the type of lighting that you have.

flux01

Adjust the Settings

You can set your location by zip code or longitude and latitude, and it helps you find those settings, if you don’t have them memorized.

flux03

You can also adjust the daytime and night settings, to control the monitor colour changes.

flux02 

Turn It Off

There’s an option to disable the colour change for an hour, if you want to work on something colour-sensitive, or if you have to stay awake to finish the project that’s due tomorrow morning.

Be careful though — when I temporarily turned f.lux off, I was almost blinded by the monitor light.

Does f.lux Help?

Will the late night colour softening help me get to sleep? Maybe. At least it makes it easier to look at the screen in the evening, so that’s a good thing. And I am starting to feel a bit drowsy…. 

Printing a Web Page

You might find something online that you want to print, such as instructions for doing something in Excel, or a tasty looking recipe.

Usually that page has a bunch of stuff that you don’t want to print, like ads and header and footers.

A while ago I discovered Print What You Like, where you can enter a URL, then clean up that page for printing. However, I could never find that page when I needed it, so I rarely used it.

Printliminator Utility

Today I found The Printliminator, a similar utility, which runs from a bookmarklet.

  • Just drag the bookmarklet to your Bookmarks toolbar, then click it when you want to clean up a page.
  • Highlight a section, then click to remove it
  • OR, press Alt and click, to remove everything except the selected section.

There’s also a set of buttons, including one to remove all graphics, and a button to Undo the last step.

Printliminator tool for web page printing
Printliminator tool for web page printing

Video: Printliminator Utility

This short video shows how the Printliminator utility works, in case you’d like to see the tool, before you start using it.

Print What You Like Bookmarklet

When I went back to find the Print What You Like page today, I saw that it has a bookmarklet too. Maybe it’s new, or I missed that the last time that I looked.

Anyway, I hope you find this useful, and I wish they’d invent a cleanup tool for email too. Then I could crop off those long paragraphs that warn me about saving the environment by not printing.

____________