Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run queries on linked DB without entering password

Status
Not open for further replies.

mbowler9

IS-IT--Management
Sep 8, 2003
105
US
I have a database linked via ODBC to and Informix database. If I don't run any queries for awhile or if I close Access and run a query upon re-opening I get a text box that shows the server name, database name, etc and it asks for the userid and password.

How can I get Access to remember the UserId and Pass, or since I call my queries with VBA, how can I code to auto-input these values?

Thanks
 
If Informix supports pass-thru queries, create your query in Informix. Go to the SQL view of the query and copy it. Return to Access, create a new query, designate it as a pass thru query and paste the SQL statement into the pass-thru query in Access. Run the query, and add passwords, userID, etc. to make sure it works.

If it works, go to the properties of your pass-thru query (by right-clicking it's title bar) and build your connect string by clicking the "..." on the right. Say yes to save password. When the cursor stops at the end of your ODBC connect string, add UID=YourUserID;PWD=Yourpassword;Company=YourCompanyID (if required)

Note: All arguments in the ODBC connect string are seperated by semicolons. The pass-thru query is read-only.

 
If Informix odbc is like sql server odbc, then the password can be saved when linking the table. When you select the table for linking there should be a checkbox for saved password.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top