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?
ohemaaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Jim P.Connect With a Mentor 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
 
James MurrellProduct SpecialistCommented:
0
 
Lee W, MVPConnect With a Mentor Technology 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
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
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
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.