<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Libname pcfiles Access database, doesn't work if database form open. in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Libname-pcfiles-Access-database-doesn-t-work-if-database-form/m-p/233366#M5777</link>
    <description>&lt;P&gt;A simple way of preventing this would be to set the Access database file as read-only via the Windows file properties.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please note Access is not designed to be a full multi-user database, so as a general rule it is safest for no-one else to be using it while you are reading it.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Nov 2015 23:12:39 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2015-11-05T23:12:39Z</dc:date>
    <item>
      <title>Libname pcfiles Access database, doesn't work if database form open.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Libname-pcfiles-Access-database-doesn-t-work-if-database-form/m-p/233189#M5772</link>
      <description>&lt;P&gt;Hello, I am using the following code to create a connection to an Access database:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname elrdb PCFILES path="C:\mlt.accdb" scan_text=no usedate=yes;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This line fails to work if I have a form open in the database in design view. The message is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: CLI error trying to establish connection: [Microsoft][ODBC Microsoft Access Driver] The&lt;BR /&gt; database has been placed in a state by an unknown user that prevents it from being opened or&lt;BR /&gt; locked.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;---&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the recommended solution to this? I have added to the SAS code to quit SAS if one of the datasets created from a table in&amp;nbsp;database contains 0 rows (which would indicate that a connection was not made and I should not continue processing).. but I would like to avoid putting these traps in throughout the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to prevent an Access database from being opened such that SAS cannot get the access it needs in order to make the libname connection?&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 23:10:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Libname-pcfiles-Access-database-doesn-t-work-if-database-form/m-p/233189#M5772</guid>
      <dc:creator>ucdcrush</dc:creator>
      <dc:date>2015-11-04T23:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Libname pcfiles Access database, doesn't work if database form open.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Libname-pcfiles-Access-database-doesn-t-work-if-database-form/m-p/233366#M5777</link>
      <description>&lt;P&gt;A simple way of preventing this would be to set the Access database file as read-only via the Windows file properties.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please note Access is not designed to be a full multi-user database, so as a general rule it is safest for no-one else to be using it while you are reading it.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2015 23:12:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Libname-pcfiles-Access-database-doesn-t-work-if-database-form/m-p/233366#M5777</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-11-05T23:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Libname pcfiles Access database, doesn't work if database form open.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Libname-pcfiles-Access-database-doesn-t-work-if-database-form/m-p/233451#M5778</link>
      <description>&lt;P&gt;Since just opening an Access database in Access locks it, at least in my system,&amp;nbsp; another application cannot get lock.If you look at the folder with the database open you'll see a file with the same name as your database but the extension of&amp;nbsp;laccdb&amp;nbsp;(for Access 2007 and later). The L stands for lock and you'll likely see a little padlock on the icon.&lt;/P&gt;
&lt;P&gt;You'll see a similar error trying to read an Excel file open in Excel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Quickest solution: close the Access database.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2015 15:42:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Libname-pcfiles-Access-database-doesn-t-work-if-database-form/m-p/233451#M5778</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-11-06T15:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Libname pcfiles Access database, doesn't work if database form open.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Libname-pcfiles-Access-database-doesn-t-work-if-database-form/m-p/233611#M5791</link>
      <description>What is the use pattern for this db?&lt;BR /&gt;If you need multi user access move the data to SQL Server. You could still use the MS Access forms in this scenario.</description>
      <pubDate>Sat, 07 Nov 2015 07:27:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Libname-pcfiles-Access-database-doesn-t-work-if-database-form/m-p/233611#M5791</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-11-07T07:27:25Z</dc:date>
    </item>
  </channel>
</rss>

