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

Hello all,

I wish to import some tables from an Access DB which is password protected and am encountering some problems. Maybe someone can help:

I get the following error message when I run the code below:

ERROR: CLI error trying to establish connection: [Microsoft] [ODBC driver for Microsoft Access] General error The registry key 'Temporary (volatile) Ace DSN for process 0x273c Thread 0x1814 DBC 0x7f82b4
   Jet 'cannot be opened..
ERROR: Error in the LIBNAME statement.
ERROR: Connection Failed.  See log for details.

 

proc import out= lib.myoutdat
           datatable= "patient" 
           dbms=accesscs replace;
     database= "mypath.\mydb"; 
     scanmemo=yes;
     usedate=no;
     scantime=yes;
	dbpwd='&mypassword';
	 run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

Your password macro variable won't resolve inside single quotes. Try double quotes:

proc import out= lib.myoutdat
           datatable= "patient" 
           dbms=accesscs replace;
     database= "mypath.\mydb"; 
     scanmemo=yes;
     usedate=no;
     scantime=yes;
	dbpwd="&mypassword";
	 run;

View solution in original post

1 REPLY 1
SASKiwi
PROC Star

Your password macro variable won't resolve inside single quotes. Try double quotes:

proc import out= lib.myoutdat
           datatable= "patient" 
           dbms=accesscs replace;
     database= "mypath.\mydb"; 
     scanmemo=yes;
     usedate=no;
     scantime=yes;
	dbpwd="&mypassword";
	 run;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 929 views
  • 0 likes
  • 2 in conversation