<?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: Using a LIBNAME ODBC connection to an Access database with custom VBAs in data in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-a-LIBNAME-ODBC-connection-to-an-Access-database-with/m-p/233014#M16892</link>
    <description>&lt;P&gt;Unfortunately,&amp;nbsp;your custom&amp;nbsp;VBA function is a something that&amp;nbsp;MS Access supports while your database is open in MS Access.&amp;nbsp;The ODBC driver can handle built-in functions (e.g. Now(), Trim(), etc.), but not custom functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest running a "make-table" statement in MS Access that calls the VBA function:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;SELECT Name, Address, &lt;STRONG&gt;NameOfVBAFunction&lt;/STRONG&gt;(name_of_column) AS Expr1
INTO [copy_of_table]
FROM [name_of_table];&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This would create a table called "copy_of_table" that contains the results of the&amp;nbsp;function call.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Nov 2015 02:22:27 GMT</pubDate>
    <dc:creator>hbi</dc:creator>
    <dc:date>2015-11-04T02:22:27Z</dc:date>
    <item>
      <title>Using a LIBNAME ODBC connection to an Access database with custom VBAs in data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-a-LIBNAME-ODBC-connection-to-an-Access-database-with/m-p/232989#M16889</link>
      <description>&lt;P&gt;&lt;FONT face="andale mono,times" size="3"&gt;I'm using SAS enterprise guide, and need to connect/pull data from a 2007 Microsoft Access Database. The database has custom queries saved as objects in it, and those queries pull from various tables within Access. Overall, there is too much data within the tables to be able to import, so I used a libname statement to connect SAS with Access. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times" size="3"&gt;&lt;FONT color="#0000ff"&gt;LIBNAME&lt;/FONT&gt; (specific to data set)&amp;nbsp;type=&lt;FONT color="#0000ff"&gt;access&lt;/FONT&gt; &lt;FONT color="#0000ff"&gt;path&lt;/FONT&gt;=&lt;FONT color="#800080"&gt;"folder path to data in server"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times" size="3"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;SERVER&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;=&lt;FONT color="#800080"&gt;&lt;FONT color="#800080"&gt;&lt;FONT color="#800080"&gt;"XXX Server numbers"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times" size="3"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT color="#0000ff"&gt;PORT&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;=xxx port numbers;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times" size="3"&gt;This libname statement works great, the library location I have referenced is reading in&amp;nbsp;objects/tables correctly without any issue. EXCEPT: &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times" size="3"&gt;Several of the tables I need to call&amp;nbsp;have a column that is populated using a custom VBA in the Access database. The VBA itself is referencing a couple different attributes within the data and other tables to populate a character in the column; it shows up in the column header when you view the properties of the table. When I try to get these tables, I get the following error: &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000" face="andale mono,times" size="3"&gt;ERROR: CLI describe error: [Microsoft][ODBC Microsoft Access Driver] Undefined function '(column name)' in expression.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times" size="3"&gt;SAS refuses to pull in any data from those tables because of this custom&amp;nbsp;VBA. What are my options here? Has anyone else run into this issue?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2015 22:34:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-a-LIBNAME-ODBC-connection-to-an-Access-database-with/m-p/232989#M16889</guid>
      <dc:creator>hello_SAS</dc:creator>
      <dc:date>2015-11-03T22:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using a LIBNAME ODBC connection to an Access database with custom VBAs in data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-a-LIBNAME-ODBC-connection-to-an-Access-database-with/m-p/233014#M16892</link>
      <description>&lt;P&gt;Unfortunately,&amp;nbsp;your custom&amp;nbsp;VBA function is a something that&amp;nbsp;MS Access supports while your database is open in MS Access.&amp;nbsp;The ODBC driver can handle built-in functions (e.g. Now(), Trim(), etc.), but not custom functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest running a "make-table" statement in MS Access that calls the VBA function:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;SELECT Name, Address, &lt;STRONG&gt;NameOfVBAFunction&lt;/STRONG&gt;(name_of_column) AS Expr1
INTO [copy_of_table]
FROM [name_of_table];&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This would create a table called "copy_of_table" that contains the results of the&amp;nbsp;function call.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 02:22:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Using-a-LIBNAME-ODBC-connection-to-an-Access-database-with/m-p/233014#M16892</guid>
      <dc:creator>hbi</dc:creator>
      <dc:date>2015-11-04T02:22:27Z</dc:date>
    </item>
  </channel>
</rss>

