Excel oledb connection to Ms-Access database lock access db

后端 未结 3 569
温柔的废话
温柔的废话 2021-01-12 18:17

I have an excel spreadsheet that connects to MS-Access 2003 database using ole db connection. When I refresh the data in spreadsheet and open my ms-access database it says d

相关标签:
3条回答
  • 2021-01-12 19:01

    Change "Mode=Share Deny Write" to "Mode=Read"

    in connection string

    0 讨论(0)
  • 2021-01-12 19:10

    Have you checked that the Excel user has full permissions on the folder containing the Access file?

    0 讨论(0)
  • 2021-01-12 19:19

    Excel's background refresh option is enabled. Disable it, or use the query studio to design the query as DBQ.

    <xml id=msodc><odc:OfficeDataConnection xmlns:odc="urn:schemas-microsoft-com:office:odc"
    xmlns="http://www.w3.org/TR/REC-html40">
      <odc:Connection odc:Type="ODBC">
        <odc:ConnectionString>
        DBQ=<database path and filename>;DefaultDir=<database path>;
        Driver={Microsoft Access Driver (*.mdb, *.accdb)};DriverId=25;
        FIL=MS Access;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;
        ReadOnly=1;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;
        </odc:ConnectionString>
      <odc:CommandText>SELECT ... FROM ... WHERE ... </odc:CommandText>
      </odc:Connection>
    </odc:OfficeDataConnection></xml>
    
    0 讨论(0)
提交回复
热议问题