<?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: How do I close an Access database located on a windows pc or local network using SAS 9.4 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955093#M373007</link>
    <description>Thanks, SASKiwi. I'll think about that but I still think I would need to close Access to remove the lock in this scenario.</description>
    <pubDate>Sat, 04 Jan 2025 02:08:12 GMT</pubDate>
    <dc:creator>Ryanb2</dc:creator>
    <dc:date>2025-01-04T02:08:12Z</dc:date>
    <item>
      <title>How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/954793#M372880</link>
      <description>&lt;P&gt;I can't seem to find any simple code that closes an open file.&amp;nbsp; I was hoping to find an x command like I use routinely to delete files.&amp;nbsp; I'm trying to make sure an Access database is closed before writing to it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;options noxwait;&lt;BR /&gt;x close "C:\TEMP\test.accdb"; &lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2024 23:28:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/954793#M372880</guid>
      <dc:creator>Ryanb2</dc:creator>
      <dc:date>2024-12-30T23:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/954829#M372913</link>
      <description>&lt;P&gt;It depends on how or who has the data base file open.&amp;nbsp; If you are using the Access library engine and a SAS library reference to read from the data bases tables, clearing the libref will close the file handles.&amp;nbsp; Same if you are using ODBC, clearing the libref will disconnect from the data base and free up file locks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;libname accdb access "c:\temp\test.accdb" ... ;
...
libname accdb ; &lt;/PRE&gt;
&lt;P&gt;If on the local network it is possible another person or process has the data base open which would prevent operations such as deleting the db file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 19:04:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/954829#M372913</guid>
      <dc:creator>RichardAD</dc:creator>
      <dc:date>2024-12-31T19:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/954831#M372914</link>
      <description>&lt;P&gt;Thanks for your response, Richard.&amp;nbsp; I'm using proc export doing a full replace of a table (see code below).&amp;nbsp; I think this will let me export the file even if the database is open, but that seems risky, and if a form is open then I think it will kick out an error.&amp;nbsp; I'd like each user to run an automated job every evening to close the database in case they left it open.&amp;nbsp; But I can't seem to find code that will do that.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC EXPORT DATA= sashelp.class 
            OUTTABLE= "CLASS" 
            DBMS=ACCESS REPLACE;
	DATABASE="C:\TEMP\test.accdb";
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Dec 2024 19:39:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/954831#M372914</guid>
      <dc:creator>Ryanb2</dc:creator>
      <dc:date>2024-12-31T19:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/954832#M372915</link>
      <description>&lt;P&gt;An end-of-day scheduled job can run a powershell script that contains.&lt;/P&gt;
&lt;PRE&gt;Get-Process | where name -EQ 'msaccess' | Stop-Process&lt;/PRE&gt;
&lt;P&gt;If a user would not be active and has accidentally left Access open and is connected to the data base in question, shutting down Access will disconnect and free up its locks on the data base file.&amp;nbsp; It would have to be scheduled on each client machine that would be running Access.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 20:02:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/954832#M372915</guid>
      <dc:creator>RichardAD</dc:creator>
      <dc:date>2024-12-31T20:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/954833#M372916</link>
      <description>&lt;P&gt;This looks like a promising solution, Richard.&amp;nbsp; Thank you!&amp;nbsp; I'm not as familiar with running powershell scripts but I'll look into this and get back to you.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 20:07:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/954833#M372916</guid>
      <dc:creator>Ryanb2</dc:creator>
      <dc:date>2024-12-31T20:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/954840#M372921</link>
      <description>&lt;P&gt;IMHO, if you are having to use workarounds like this then you have chosen the wrong tool for the job. Does your company have other multi-user database software to handle your requirement? Loading your data into a relational database like SQL Server seems like a better option to me as multi-user functionality is built-in. With SAS/ACCESS to ODBC you can work with any ODBC-compliant database.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 23:19:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/954840#M372921</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-12-31T23:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955044#M372990</link>
      <description>Thanks for your post.  I should probably open another post about this to discuss further.  I've worked with our IT department and with our SAS contact on alternatives.  If it was just data storage then we would do something different, but it's everything else Access does that's really useful.  We have several databases with user interfaces that allow for data entry, filters, quick links...  Our IT department could probably create a GUI interface using another application but it makes us less self sufficient.  Some are very simple and some are very complex.  IT has their own timelines, versioning schedules, and they're expensive.  You got any ideas?</description>
      <pubDate>Fri, 03 Jan 2025 17:44:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955044#M372990</guid>
      <dc:creator>Ryanb2</dc:creator>
      <dc:date>2025-01-03T17:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955071#M372998</link>
      <description>&lt;P&gt;You will find a bounty of information simply searching "migrate access forms to use SQL server".&amp;nbsp; Should be enough to guide you through sandboxing a pilot you can present to your IT guidance.&amp;nbsp; You might need to alter/update your SAS license in order to export your SAS data sets to SQL Server.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2025 20:01:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955071#M372998</guid>
      <dc:creator>RichardAD</dc:creator>
      <dc:date>2025-01-03T20:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955074#M372999</link>
      <description>Thanks, Richard.  What's the learning curve for creating a user interface to facilitate data entry, with filters and quick links in SQL server so we can do this ourselves?  I know our IT department can create something like this but for the reasons already mentioned it's just not going to work.</description>
      <pubDate>Fri, 03 Jan 2025 20:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955074#M372999</guid>
      <dc:creator>Ryanb2</dc:creator>
      <dc:date>2025-01-03T20:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955088#M373003</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/46197"&gt;@Ryanb2&lt;/a&gt; - Perhaps you could consider a hybrid approach of continuing to use MS Access for data entry, but then use SQL Server for the back-end data storage where SAS can easily access it. That way involves a lot less change.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jan 2025 00:03:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955088#M373003</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-01-04T00:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955089#M373004</link>
      <description>Exactly, just change the data source/ connection string behind the form&lt;BR /&gt;</description>
      <pubDate>Sat, 04 Jan 2025 01:14:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955089#M373004</guid>
      <dc:creator>RichardAD</dc:creator>
      <dc:date>2025-01-04T01:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955093#M373007</link>
      <description>Thanks, SASKiwi. I'll think about that but I still think I would need to close Access to remove the lock in this scenario.</description>
      <pubDate>Sat, 04 Jan 2025 02:08:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955093#M373007</guid>
      <dc:creator>Ryanb2</dc:creator>
      <dc:date>2025-01-04T02:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955113#M373015</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/46197"&gt;@Ryanb2&lt;/a&gt; - But locks apply only to Access databases, and my suggestion is to move the databases / tables to SQL Server which doesn't have locking problems. Access would only be used for data entry etc.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jan 2025 21:19:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955113#M373015</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-01-04T21:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close an Access database located on a windows pc or local network using SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955219#M373066</link>
      <description>&lt;P&gt;A SQL Server administrator should be able to force remove any locks a client application (your Access data entry forms) may have gotten on a SQL Server table.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 15:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-close-an-Access-database-located-on-a-windows-pc-or/m-p/955219#M373066</guid>
      <dc:creator>RichardAD</dc:creator>
      <dc:date>2025-01-06T15:05:27Z</dc:date>
    </item>
  </channel>
</rss>

