+ Reply to Thread
Results 1 to 6 of 6

Database Connection prevents exclusive access to Database

  1. #1
    Forum Contributor
    Join Date
    07-30-2012
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    139

    Database Connection prevents exclusive access to Database

    I am using a data connection from an Access Database to populate a table in excel. The connection works great except that whenever the excel spreadsheet is open I get the following message when I try to make structural changes to the Access Database (edit a form, report, table, query, etc):

    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.
    For the purpose of my form, I only really need the database connection to refresh once when I first open Excel. Is it possible to setup the connection in a way that queries the database initially and then terminates the connection to allow exlusive access to MS Access while the worksheet is still open?

    thanks!


    I posted this same question on MrExcel as well but did not recieve an answer. I may not be expressing my question effectively, please feel free to ask for clarification if needed. thank you.

    http://www.mrexcel.com/forum/excel-q...-database.html

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Database Connection prevents exclusive access to Database

    what does the connection string look like in the connection properties? does it have a SHARE DENY setting?
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Contributor
    Join Date
    07-30-2012
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    139

    Re: Database Connection prevents exclusive access to Database

    I don't see a share Deny. Where would I put that? This is what the string looks like currently:

    Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source=O:\Bellingham\Intranet\Current Projects\Databases\Product Database\ProductDatabase.accdb;Mode=Read;Extended Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Engine Type=6;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False;Jet OLEDB:Support Complex Data=False;Jet OLEDB:Bypass UserInfo Validation=False

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Database Connection prevents exclusive access to Database

    that connection string looks ok to me-mode=read is the correct value

    perhaps you could replace the query with an ADO extract if you only need it to refresh on opening?

  5. #5
    Forum Contributor
    Join Date
    07-30-2012
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    139

    Re: Database Connection prevents exclusive access to Database

    I'd be open to trying that. I'm not familiar with that terminology though. Could you point in the right direction to get started?

    thanks!

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Database Connection prevents exclusive access to Database

    sure-here's the basics

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 07-05-2013, 09:37 AM
  2. Cannot Use ADODB.Connection to connect to an access database
    By Cardinalbags in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-18-2012, 07:09 PM
  3. [SOLVED] ADO connection with workgroup Access database
    By ca1358 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2006, 01:15 AM
  4. Replies: 2
    Last Post: 03-08-2006, 04:45 PM
  5. [SOLVED] How do make it a connection of Access Database from Excel?
    By Dennis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2005, 10:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1