Learning SAS? Welcome to the exclusive online community for all SAS learners.

Libname error using PCFILES engine for Access

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Libname error using PCFILES engine for Access

I'm getting the following error when running a libname assignment statement.  I'm able to get the libname statement to work with Excel workbooks but not Access databases.  The Access database has not special security, username, or password and its all just default settings when an Access 2010 database is created.  Thanks in advance for your help.

 

ERROR: CLI error trying to establish connection: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Access database engine

cannot open or write to the file '(unknown)'. It is already opened exclusively by another user, or you need permission to

view and write its data.

ERROR: Error in the LIBNAME statement.

 

Here's my statement:

 

 

libname myaccdb PCFILES

server="myservername"

path="\\mypath\test.accdb";

serveruser="&USERID"

serverpass="&PSW_PASSWORD";

run;


Accepted Solutions
Solution
‎10-27-2016 10:46 AM
Super User
Super User
Posts: 7,401

Re: Libname error using PCFILES engine for Access

That doesn't look syntactically correct that code you posted:

libname myaccdb PCFILES
server="myservername"
path="\\mypath\test.accdb";
serveruser="&USERID"
serverpass="&PSW_PASSWORD";
run;

There is a semicolon after accdb"; which means serveruser and serverpass are not part of the libname statement.  And you have a random run; statement there as well.

View solution in original post


All Replies
Solution
‎10-27-2016 10:46 AM
Super User
Super User
Posts: 7,401

Re: Libname error using PCFILES engine for Access

That doesn't look syntactically correct that code you posted:

libname myaccdb PCFILES
server="myservername"
path="\\mypath\test.accdb";
serveruser="&USERID"
serverpass="&PSW_PASSWORD";
run;

There is a semicolon after accdb"; which means serveruser and serverpass are not part of the libname statement.  And you have a random run; statement there as well.

New Contributor
Posts: 2

Re: Libname error using PCFILES engine for Access

Thanks. Newby. Palm slapping forehead.
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 670 views
  • 2 likes
  • 2 in conversation