Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

Script for ODBC

Is there a script to set up DSN ODBC where I can hard code username and password to avoid been prompted each time?
0
ohemaa
Asked:
ohemaa
2 Solutions
 
James MurrellProduct SpecialistCommented:
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
cs97jim3,

Just posting links with no explanation is frowned upon here.  Please explain why you think this link will help him (after reading it, I don't see how it will... my understanding is that he wants to script the creation of the DSN - not a script for connecting to an existing DSN.
0
 
Jim P.Commented:
If you are using the SQL Server ODBC driver, it doesn't matter if you put the password in DSN, it will not pick it up and use it. It isn't designed that way.

I have VBA module that will create a DSN on the fly, and I know of several other methods of doing it depending on constraints.

Can you give us a little more detail on what you are trying to accomplish?
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
ohemaaAuthor Commented:
trying to create DSN with username and password embedded in the code so that users do not get prompted for the username and password whenever they try to access an application via the DSN/ODBC
0
 
Jim P.Commented:
What is your front-end? You will have to do it there.

If it is Access, when you link the tables on the lower right is a check box for Save Password. Turn that on, and that should solve the problem.
Save-ODBC-Password.gif
0
 
ohemaaAuthor Commented:
SQl server
0
 
Jim P.Commented:
SQL server is generally considered the back-end. You have some sort of application that connects to the SQL Server. Depending on how that is designed is whether you can save the password.

The other option is to use Active Directory users and groups with trusted connections.
0
 
ohemaaAuthor Commented:
Crystal reports
0
 
Jim P.Commented:
Crystal Reports won't save a SQL Server ID by default.

You would need to create an Active Directory user/group and use the Trusted Connection setting.
0
 
ohemaaAuthor Commented:
Leew..thanks for your comments above.
0
 
Jim P.Commented:
Glad to be of assistance. May all your days get brighter and brighter.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now