BookmarkSubscribeRSS Feed
MattJans
Obsidian | Level 7

Hi there! I googled and checked the SAS Communities but didn't see any help on this. The code below works fine on SAS 9.4, but doesn't work, and gives an error (see below). In case it's not obvious, the XXX and YYY are real names in my working code. Just didn't want to post those here. I also tried (in EG) changing single quotes to double, and putting the code all on one line. Still gives the same errors. I think it's the first error that's most relevant. On 9.4 this opens a dialogue box where I enter my UN and PW for this server.  

 

libname XXX oledb provider=sqloledb prompt=YES

        dataSource='YYY' properties=('Initial Catalog'=XXX_db)

        schema=dbo access=readonly;

 

ERROR: Error trying to establish connection: Unable to prompt for connection information.
ERROR: Error in the LIBNAME statement.

 

Any help would be great. Thanks! 

2 REPLIES 2
Tom
Super User Tom
Super User

PROMPT means that it wants to open a window on the CONSOLE to ASK YOU to complete the signon details, like password, etc.

 

But if you are using Enterprise Guide to submit the SAS code then there is no way for SAS itself to interact with you.  All your interactions are with Enterprise Guide instead.

 

Get it to work without the PROMPT in Display Manager and then the same code should work when submitted in the background via Enterprise Guide.

ChrisHemedinger
Community Manager

Tom is correct --  you will need to provide the credentials for the OLEDB connection. Your options are:

- user/password (you can use PWENCODE to obscure a clear-text password)

- set an AUTHDOMAIN in an administered environment with the credentials you need, and reference that in your code.

- use single-signon/Integrated Windows Authentication -- requires that the same identity using EG is connecting to SAS which is then connecting to the OLEDB source, and all steps are set for Trusted for Delegation

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 328 views
  • 2 likes
  • 3 in conversation