Help using Base SAS procedures

Connection Error

Reply
New Contributor
Posts: 2

Connection Error


Hi all-

I am using 9.3 and get the following error when reading in Access files:

 

ERROR:
Error trying to establish connection: Unable to create Data Source.: Class not registered

 

ERROR: Error in the LIBNAME statement

The line of code is as follows:

Libname SBI oledb init_string="Provider=Microsoft.ACE.OLEDB.12.0;Password="";DataSource=&Path.\&loanFileName.;Persist Security Info=True";

I am assuming the 2nd error will resolve once the first error is remediated. Any help is appreciated. Thank you.

Super User
Posts: 11,343

Re: Connection Error

Have you tried replacing the macro variables with appropriate literal text?

Super User
Posts: 5,518

Re: Connection Error

Most likely the problem lies with your specification for Password.  Since your entire INIT_STRING is enclosed in double quotes, consecutive double quotes within the string are interpreted as one double quote instead of two.  Would the syntax for Password be acceptable if you changed to single quotes instead of double?  If not, try replacing the two consecutive double quotes with four consecutive double quotes.

Good luck.

New Contributor
Posts: 2

Re: Connection Error

Posted in reply to Astounding

Thank you - I have tried your suggestions and still still get the connection error. I have reviewed the SAS note as well, and have ensured I have the ACE.

I have two co-workers in the office who are able to run this code with no issues - I am the only one running into this connection error. We have gone through all of our settings, ensuring I have everything they have. We are all running on the same platforms and programs. I believe something is not right with the install on my machine. We have reviewed the code line by line, ensuring there is no difference when I run it. I will next try to uinstall and re-install and see if that remediates this issue.

Thank you all for your suggestions.

Super User
Posts: 3,261

Re: Connection Error

This SAS note is pretty close to your error:

http://support.sas.com/kb/37/412.html

Try the suggestions.

Ask a Question
Discussion stats
  • 4 replies
  • 444 views
  • 7 likes
  • 4 in conversation