Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4237068
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:43:28+00:00 2026-05-21T02:43:28+00:00

I open a Microsoft Access file normally and I can see its locked by

  • 0

I open a Microsoft Access file normally and I can see its locked by Micorsoft Office. I then attempt to check if its writeable with PHP:

echo '|--> '.is_writeable('C:\wamp\www\Database1.accdb');

But it returns a 1. Surley, it should return a 0 when open?

Just to test, I then attempt to write to it:

$fh = fopen('C:\wamp\www\Database1.accdb', 'w+');

fwrite($fh, 'hello');

It lets me do so! Is there anyway I can make sure if a file is not open by another program?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T02:43:29+00:00Added an answer on May 21, 2026 at 2:43 am

    When you open a Microsoft document regardless weather its a word, power-point or access file the application will create a file within the same directory that is marked as hidden, this file is what tell’s the office application that the file is being used.

    the file in question is NOT Locked by the operating system therefore the OS Cannot determine weather the file is opened by an MS Application.

    What you have to do is check to see if the lock file exists, this then will allow you to determine weather the document is currently open by the associated application.

    Something like:

    if(is_writeable("file.accdb") && !file_exists("file.lccdb"))
    {
        touch("file.lccdb"); //mimic the file is being used
    
        /*
            * do Work
        */
    
        unlink("file.lccdb"); //Remove it
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i dont have microsoft access but would like to open an mdb file, is
I tried to use F# read a xls file as below open Microsoft.Office.Interop.Excel let
I have a very simple Office utility question. Open Microsoft word (2003 or 2007),
open message box and long click on a message , as you can see
I need to access an excel file that is already open. I thought just
How can I access a XML Excel format file with an OLE Connection? Can
Today I needed to parse some data out from an xlsx file (Office open
I have wrote a code that can read an excel 2007 file using Microsoft
I need to implement a simple probe that uses open microsoft rdp protocol. But
I'm getting an issue with the F# powerpack quotation evaluation. open Microsoft.FSharp.Linq.QuotationEvaluation let print

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.