I have created a system DSN to an SQL Database programmatically and would like to test the database connection via a command button before executing any queries against the database.
Can anyone help me write this?
I have created a system DSN to an SQL Database programmatically and would like to test the database connection via a command button before executing any queries against the database.
Can anyone help me write this?
How are you invoking your queries - ADO ?
If so, why not just add an Error trap at the point of creating the connection ?
ie along the lines of:
![]()
Please Login or Register to view this content.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
I used the below function (in conjunction with others) to create the DSN
and then the below to query the data when required.![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Doesn't the database provide a tool that alloows you to create the DSN and run a test against it?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks