DATA Step, Macro, Functions and more

Libname to create a connection to Access DB

Accepted Solution Solved
Reply
Contributor
Posts: 35
Accepted Solution

Libname to create a connection to Access DB

Can someone give me the Code to create a library using an Access DB on a local server (X:ab/cd/ef.accbd)


Accepted Solutions
Solution
‎11-16-2016 11:36 AM
Respected Advisor
Posts: 4,641

Re: Libname to create a connection to Access DB

Typically it is as simple as 

 

libname ac Access "X:ab/cd/ef.accdb" access=readonly;

 

What did you try?

PG

View solution in original post


All Replies
Solution
‎11-16-2016 11:36 AM
Respected Advisor
Posts: 4,641

Re: Libname to create a connection to Access DB

Typically it is as simple as 

 

libname ac Access "X:ab/cd/ef.accdb" access=readonly;

 

What did you try?

PG
Contributor
Posts: 35

Re: Libname to create a connection to Access DB

Thank you! that was the push I needed, now I am good with the connection.

When using SAS statements to JOIN two tbles, is it as simple as JOIN?
Respected Advisor
Posts: 4,641

Re: Libname to create a connection to Access DB

LIBNAME is a layer of abstraction that allows you (at least in principle) to ignore the exact origin of data tables. But you should always check the data type of imported table columns, especially date types. 

PG
Regular Contributor
Posts: 239

Re: Libname to create a connection to Access DB

To connect MS Access database, we need to create ODBC connection. 

Need to create ODBC string then use that string to create MS Access Server in SAS Management console 

Then you can either create library using wizard or write LIBNAME statement to use MS Access table 

 

For more details refer to following link

http://support.sas.com/documentation/cdl/en/bidsag/68193/HTML/default/viewer.htm#n167cjb87i0x9wn1h1q...

https://support.sas.com/documentation/cdl/en/acpcref/63181/HTML/default/viewer.htm#n1wvmggexroxgyn17...

☑ This topic is SOLVED.

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

Discussion stats
  • 4 replies
  • 171 views
  • 1 like
  • 3 in conversation