By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,658 Members | 1,908 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,658 IT Pros & Developers. It's quick & easy.

How to persist UID/PWD when setting PassThrough query .Connect?

P: n/a
I'm doing this:
---------------------------------------------------------
5200 Case "Query"
On Error Resume Next
Set curQD = thisDB.QueryDefs(!ObjectName)
curErr = Err
On Error GoTo reconnect_PACE_err
5210 Select Case curErr
Case 0
5221 curQD.Connect = !ConnectionString
5230 Case 9
5240 Case Else
5299 End Select
---------------------------------------------------------

Works fine until I shut down the app and re-open it; then the PWD and
UID
parms come up empty.

e.g.
Before:
ODBC;DRIVER=Oracle ODBC Driver;UID=ABC;PWD=XYZ;TLO=O.......

After:
ODBC;DRIVER=Oracle ODBC Driver;UID=;PWD=;TLO=O.......

I notice similar behaviour when updating .Connect in linked tables and
my workaround there was to delete the link and re-create it using
DoCmd.TransferDatabase - which somehow makes UID/PWD persist.

Do I have to rename the QueryDef, create a new one, copy the SQL, set
the .Connect, and delete the renamed one...or is there a workaround
when just updating .Connect?
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
RE/
Works fine until I shut down the app and re-open it; then the PWD and
UID
parms come up empty.


I think this is some sort of RCI on my part.

Checked some other queries and the UID/PWD were still there.
--
PeteCresswell
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.