SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

Not able to Import MS Access .accdb or .mdb in Base 9.4 Do I need to Know my Server?

Reply
Occasional Contributor
Posts: 12

Not able to Import MS Access .accdb or .mdb in Base 9.4 Do I need to Know my Server?

So my project has me starting off with importing MS Access files, but the thing is I'm not able to do that. While I have ran this code below to tell me if I have SAS/ACCESS engine. :

PROC SETINIT;

RUN;

it tells me I do until for orcle, PC files, and ODBC.


I just can't run this code:

%let name="Path\location\AccessFileName";

option symbolgen;

proc import DBMS=ACCESSCS

  table="table1"

  OUT = tableout1

  REPLACE;

  DATABASE=&name;

RUN;

But This code bellow works

proc import datafile="Path\location\TableFileName"

     OUT=tableout2

     DBMS=xls

     REPLACE;

     getnames=yes;

RUN;

64 bit system, 64 bit SAS platform, 64 bit MS office suite. No idea what is happening.

Is my issue not specificity my server, and if that is the case how do I find what my server name is?

I've read this 33228 - An error occurs when you use SAS® 9.2 to import or export Microsoft Excel or Access files in...

but can't tell how to find my server...

Grand Advisor
Posts: 9,748

Re: Not able to Import MS Access .accdb or .mdb in Base 9.4 Do I need to Know my Server?

You used DATABASE in the first example not DATAFILE. Also the ; before DATABASE ended the Proc Import statement early.

Occasional Contributor
Posts: 12

Re: Not able to Import MS Access .accdb or .mdb in Base 9.4 Do I need to Know my Server?

You would be correct if for that part of code I was trying to import an excel file, but I was trying to open the MS access file.

Grand Advisor
Posts: 16,419

Re: Not able to Import MS Access .accdb or .mdb in Base 9.4 Do I need to Know my Server?

Have you tried doing it via the point and click import and saving the code?

If it doesn't work, it helps if you post the log as well.

Occasional Contributor
Posts: 12

Re: Not able to Import MS Access .accdb or .mdb in Base 9.4 Do I need to Know my Server?

Here is the error for the point and click.

ERROR: Connect: Class not registered

ERROR: Error in the LIBNAME statement.

Now using the libname:

libname mdb pcfiles path="test.mdb";

I get this error:

ERROR: Unable to locate pcfserver.exe. Please install PC Files Server.

ERROR: Error in the LIBNAME statement.

Which is so weird to me becase when I run this code it shows that I have PC Files and accessing excel files works just fine....:

---SAS/ACCESS Interface to PC Files

Occasional Contributor
Posts: 12

Re: Not able to Import MS Access .accdb or .mdb in Base 9.4 Do I need to Know my Server?

It turns out I am running a 32 bit MS Office, sorry about the missup and found this link.

38779 - The 64-bit edition of SAS/ACCESS® 9.2 Interface to ODBC running in a 64-bit Windows operatin...

Is there any update to this, or do we still need to use older SAS programs?

Occasional Contributor
Posts: 12

Re: Not able to Import MS Access .accdb or .mdb in Base 9.4 Do I need to Know my Server?

I found a potential solution, here.

SAS Downloads: SAS PC Files Server

Post a Question
Discussion Stats
  • 6 replies
  • 1911 views
  • 0 likes
  • 3 in conversation