Solved

Script for ODBC

Posted on 2008-06-26
11
235 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

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
 

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 …
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how the fundamental information of how to create a table.

830 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