Solved

Script for ODBC

Posted on 2008-06-26
11
232 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

911 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

22 Experts available now in Live!

Get 1:1 Help Now