Solved

Pass thru query login question

Posted on 2008-06-18
3
222 Views
Last Modified: 2013-11-27
I am connecting to a database to try to retrieve a report someone has written. The best way for me to do this is (i believe) through a pass thru query. I have pasted the SQL from the their report into my pass thru query and it works fine, the problem is everytime i run this query i need to do the ODBC settings and enter the username and password to access the external database. Obv this is no good when clients are using the database.
Is there a way around this?

Many Thanks,
Dean
0
Comment
Question by:deanlee17
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
therealmongoose earned 500 total points
ID: 21813953
Yes - if you set up a saved query as an odbc query and go into the query properties (right click the blue bar at the top of the query screen), you can set the odbc connection str (click on the right of the field to show the button with "...") when you've selected the appropriate odbc connection, click save - you'll be asked if you want to save the password and user name with the query - that way you don't need to keep re entering the details...

As an aside, it's best to use a file dsn rather than a machine dsn for this type of connection - that way you can run the query on any machine.....
0
 
LVL 4

Expert Comment

by:shekharsom
ID: 21814064
The best way is either:

1. change the query string to include username and password.

or

2. create a dns
0
 

Author Closing Comment

by:deanlee17
ID: 31468411
Excellent. Spot on.
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

617 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