Skip to main content
June 22, 2007
Question

Opening an MS Access Database

  • June 22, 2007
  • 2 replies
  • 1008 views
I have an app that attempts to "launch" MS Access and open a database. MS Access is starting up successfully, but the user is presented, by MS Access a message that reads "You do not have exclusive access to the database at this time. If you proceed to make changes, you may not be able to save them later." - I am using cflocation to launch ms access with the selected database file. What might I be doing to cause this message to appear and what is the best way to open a database launch the ms access application through my cf app. I have verified the obvious that another user might have the file open at the time we attempt to access the database, and we are the only process accessing the file at that time.

Any help would be greatly appreciated.

Craig
    This topic has been closed for replies.

    2 replies

    tclaremont
    Inspiring
    June 22, 2007
    I think what you are after is CFEXECUTE rather than CFLOCATION.

    Do you have security enabled on the Access database? If so, is the username and password being passed to the Access database when you attempt to start it?

    Is the Access application secuirty set up to open the database in shared mode?
    June 22, 2007
    Please don't cross-post - you already have this question in the Database Access forum.

    When you say you "launch" MS Access, exactly what code are you executing to do this? Usually, you code a CFQUERY to do a SELECT of what data you want to retrieve. That would not create the message you are seeing.
    Inspiring
    June 22, 2007
    well, under almost all conditions, you would never use cfml to work on the database in this way. what extreme condition are you under in order to be doing this? you need to develop interfaces to view, edit, insert, delete, etc... the data in the db. the best way to "open" an MS Access DB in CF is to create a datasource in your CF Admin control panel or in your windows ODBC control panel. if you already have a datasource, it might be that that has a lock on your db. check the dir that the .mdb is in and see if there is a .ldb
    June 22, 2007
    I do understand about working with databases and using cfquery - this is not what the user wanted to do with this application. The application in question is to act like a portal to all of their files. It acts as a way of organizing and finding these files easier than using the windows filing system. The screen that shows information (File name, subject matter expert and various other information about the file) also contains a "launch" button that allows the user to open the appropriate application (excel, access etc). The application also allows the user to store links ( http://....) and a browser window will open in those cases. When the selected file is an mdb file, this is when we get the message in question. Does that help?

    Craig