I have an SQL database and want to connect to it using VBA in order to support some legacy functionality. I’m using an ADODB connection and need to know what my database DSN is. How can I find this?
I’m using SQL Server 2008, thanks! 😀
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A DSN (data source name) is an indirect way of referring to the database. You have to create them manually (or semi-automatically using a wizard of some kind). Go to
ControlPanel->AdministrativeTools->DataSources (ODBC)to see if one has already been defined for the database to which you want to connect.But I think you might mean “connection string”, not “DSN”. There are many, many ways to tell ADODB how to find and connect to your database (
DSNsare just one of those), but you always need a connection string.I have often turned to ConnectionStrings.com to help me through the maze of similar-but-not-identical options.