Solved

Script for ODBC

Posted on 2008-06-26
11
231 Views
Last Modified: 2011-10-19
Is there a script to set up DSN ODBC where I can hard code username and password to avoid been prompted each time?
0
Comment
Question by:ohemaa
11 Comments
 
LVL 31

Expert Comment

by:James Murrell
ID: 21881502
0
 
LVL 95

Assisted Solution

by:Lee W, MVP
Lee W, MVP earned 150 total points
ID: 21881520
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
 
LVL 38

Expert Comment

by:Jim P.
ID: 21886054
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
 

Author Comment

by:ohemaa
ID: 21900155
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
 
LVL 38

Expert Comment

by:Jim P.
ID: 21900188
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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

Author Comment

by:ohemaa
ID: 21917187
SQl server
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 21917437
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
 

Author Comment

by:ohemaa
ID: 21917869
Crystal reports
0
 
LVL 38

Accepted Solution

by:
Jim P. earned 350 total points
ID: 21918121
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
 

Author Closing Comment

by:ohemaa
ID: 31470987
Leew..thanks for your comments above.
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 22419552
Glad to be of assistance. May all your days get brighter and brighter.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now