Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Hiding password in DSN string

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-11-18 : 08:23:02
nam writes "When accessing a SQL 2000 database via APP, is their a way to hide the UserID and Password in the DSN string (not have to put them in your ASP pages)?

Thanks

Nam"

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-11-18 : 09:31:38
Use a UDL file. then indicate that you connection should use the parameters set in the UDL file. Keep the UDL in a secure place that only the administrator and web service have access to, and everything should be secure. it's also much easier to administer this way -- if anything about the connections needs to change, you just update the one file and everything works, without having to alter multiple pages or include files.

to create a UDL, there may be an easier way, but I just right click somewhere and create a new text document. then I rename it to "SOmething.UDL". then, you just double-click on it and you can edit all the properties, test it, and then resave it. THen, you are good to go! just reference the UDL file in your connect string:

dim c
set c =createobject("ADODB.Connection")
c.open "SomeFile.UDL"





- Jeff
Go to Top of Page
   

- Advertisement -