BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
gdaymte
Obsidian | Level 7

I am using SAS Studio (x64) and Microsoft Access (Offcie 365, x64). I would like to export a SAS dataset to Access. Beacuase I am using SAS Studio, I am unable to point to a specific drive letter for the DATABASE. So I need to point to \\server-name\file.accdb.

 

PROC EXPORT DATA = DCR.A_EXTRACT
OUTTABLE='A_EXTRACT'
DBMS=ACCESSCS REPLACE;
DATABASE= "\\server-name\file.ACCDB";
RUN;

 

I keep getting the error of "ERROR: Failed to connect to the Server: .". This works for exporting to CSV or XLSX, but it doesn't seem to work for ACCESS. Is there an option that I need to add to my code?

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

If both are 64 bit you shouldn't need ACCESSCS, CS is for when one is 32bit and one is 64bit. 

Have you tried DBMS=ACCESS or an ODBC connection?

 


@gdaymte wrote:

I am using SAS Studio (x64) and Microsoft Access (Offcie 365, x64). I would like to export a SAS dataset to Access. Beacuase I am using SAS Studio, I am unable to point to a specific drive letter for the DATABASE. So I need to point to \\server-name\file.accdb.

 

PROC EXPORT DATA = DCR.A_EXTRACT
OUTTABLE='A_EXTRACT'
DBMS=ACCESSCS REPLACE;
DATABASE= "\\server-name\file.ACCDB";
RUN;

 

I keep getting the error of "ERROR: Failed to connect to the Server: .". This works for exporting to CSV or XLSX, but it doesn't seem to work for ACCESS. Is there an option that I need to add to my code?


 

View solution in original post

8 REPLIES 8
Reeza
Super User

If both are 64 bit you shouldn't need ACCESSCS, CS is for when one is 32bit and one is 64bit. 

Have you tried DBMS=ACCESS or an ODBC connection?

 


@gdaymte wrote:

I am using SAS Studio (x64) and Microsoft Access (Offcie 365, x64). I would like to export a SAS dataset to Access. Beacuase I am using SAS Studio, I am unable to point to a specific drive letter for the DATABASE. So I need to point to \\server-name\file.accdb.

 

PROC EXPORT DATA = DCR.A_EXTRACT
OUTTABLE='A_EXTRACT'
DBMS=ACCESSCS REPLACE;
DATABASE= "\\server-name\file.ACCDB";
RUN;

 

I keep getting the error of "ERROR: Failed to connect to the Server: .". This works for exporting to CSV or XLSX, but it doesn't seem to work for ACCESS. Is there an option that I need to add to my code?


 

gdaymte
Obsidian | Level 7
That simple change worked. Thanks.
ketu497
Calcite | Level 5

We recently upgraded to Access Office365 and I tried the solution


proc export data=sashelp.class outtable="classkp"
DBMS=ACCESS REPLACE;
DATABASE = "location\classkp.mdb";

run;

 

however still getting the following error. Is this any other solution to this issue.

 

29 run;

Connection Failed. See log for details.
NOTE: The SAS System stopped processing this step because of errors.

SASKiwi
PROC Star

Was it working prior to the upgrade? What bitness of Office 365 are you using 32-bit or 64-bit?

 

Are you running this on a remote SAS server session or on your PC? 

ketu497
Calcite | Level 5

Yes it was working prior to the upgrade with the 

DBMS=ACCESSCS and then based on the given solution, I changed it to DBMS=ACCESS.

 
I am running this on the SAS Enterprise guide my PC.
SASKiwi
PROC Star

Is EG connecting to a remote SAS server or to SAS on your PC? If you use a connection profile you are using remote SAS.

 

If your SAS is remote and runs on Unix you have to keep using ACCESSCS as MS Access doesn't run on Unix. You should also talk to your SAS administrator about your issue as they will be more familiar with your SAS installation.

ketu497
Calcite | Level 5

@SASKiwi I verified and our EG connecting to a remote SAS server and SAS remote is not running on Unix so then should this not work. Is there anything the SAS administrator have to do after the Office 365 upgrade on their side. 

 

 

SASKiwi
PROC Star

ACCESSCS requires that you have the SAS PC File Server installed and running as a Windows service, preferably on the Windows server you are writing to. From the error you are getting it looks like SAS PCFS isn't running.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 3482 views
  • 2 likes
  • 4 in conversation