Jump to content

Add DSNs for SQL Server databases


Guest BinaryVision
 Share

Recommended Posts

Guest BinaryVision

I created this script at work some time ago, and occasionally I update it or make an improvement. System DSNs for SQL Server can easily be added to (or deleted from) a local/remote system via use of the Windows registry. The only information you need to add/delete one is the name you wish to call the DSN, the SQL Server name, and the SQL Server database name. I do not deal with different instances of SQL Server on the same machine, so some additional values may need to be written to the registry when adding such a DSN.

I have used this script specifically to add DSNs for data entry operators and form designers where Cardiff (now Verity) TELEform is used to enter forms linked to an ODBC (in this case ODBC DSN) export routine. Although simple, feel free to spice it up if you wish. I am not familiar with use of the GUI since I don't have a lot of time for that, but maybe someday I will get around to it.

ENJOY!!!

SQLServerDSN_eg.au3

Link to comment
Share on other sites

  • 1 year later...

Hey -- this works great? Has anybody done this for non-trusted SQL connections? I.e. one that adds database user and password to the registry? (of course, you'd have to know where the password was stored and hashed, which I don't).

I created this script at work some time ago, and occasionally I update it or make an improvement. System DSNs for SQL Server can easily be added to (or deleted from) a local/remote system via use of the Windows registry. The only information you need to add/delete one is the name you wish to call the DSN, the SQL Server name, and the SQL Server database name. I do not deal with different instances of SQL Server on the same machine, so some additional values may need to be written to the registry when adding such a DSN.

I have used this script specifically to add DSNs for data entry operators and form designers where Cardiff (now Verity) TELEform is used to enter forms linked to an ODBC (in this case ODBC DSN) export routine. Although simple, feel free to spice it up if you wish. I am not familiar with use of the GUI since I don't have a lot of time for that, but maybe someday I will get around to it.

ENJOY!!!

SQLServerDSN_eg.au3

Edited by KenD
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...