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!

ODBC password

Status
Not open for further replies.

Jings00

Technical User
Jun 10, 2004
3
CA
Ok my issue:
I have an automation system built on VBA code that opens various access databases and performs updating macros/procedures in each. It does this at 5am so my user group will have updated info when their day starts. My problem is most of these target databases have linked ODBC tables that are accessed during this process, all of which require a password to access (all the same password). This is no problem if my ODBC/client service "remembers" my password from a previous access, but sometimes it does not and this procedure will time-out without updating anything. Is there someway to feed this password into an ODBC call? Possibly by manipulating JET?
 
You can set a queries property Source Connect String to include the ID and Password so that you don't have to be prompted or the system doesn't have to remember it.

[codeODBC;DSN=salessrv;UID=jace;PWD=password;DATABASE=sales;[/code]

Post back if you have any questions concerning this process as I have designed just such a system in the past.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
thanks for the prompt reply.
At this point I am willing to try anything, but does this setting need to be added to the "Target" databases? That adds a complication due to the sheer number. I was hoping for a solution that would involve manipulating the automation system code only.
 
This code needs to be added to your Front-End application that is linked to your ODBC database. You only need to add it to your queries that are going to access the tables requiring the logon.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top