473,411 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

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

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
1 2688
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: MLH | last post by:
I'm using Access 97 to run a pass through query to delete some records in a remote database table. I get an error saying no records returned & am warned that if records don't need to be returned,...
1
by: PeteCresswell | last post by:
I'm doing this: --------------------------------------------------------- 5200 Case "Query" On Error Resume Next Set curQD = thisDB.QueryDefs(!ObjectName) curErr = Err On Error GoTo...
7
by: Bri | last post by:
Greetings, I have a Passthrough Query to SQL Server that I want to know the RecordsAffected, but it always returns 0. This worked perfectly when it was an Access Query on the ODBC linked...
4
by: Alberto | last post by:
Could you tell me what it's for the "Persist Security Info ..." value in a connection string. Thank you.
3
by: John Dalberg | last post by:
I am setting the HttpContext.Current.User in the Application_AuthenticateRequest event in global.asax.cs. When I use the IsInRole function in a web page, it works fine. So far so good. (Note that...
3
by: Jay-nospam | last post by:
Hi there, I am having trouble getting an ASP.NET web application to connect to another computer and passing the proper credentials and I hope someone can help me. I have a stand-alone Windows...
0
by: lesperancer | last post by:
I've got a sql server view that returns data, as a linked table to access97 (qryPlannedPurPT) this link table is used in an access query (qryPlannedPUR) that uses all of the linked table fields...
2
by: RoadrunnerII | last post by:
Hi All I am new to this forum and still learning MS Access. Hoping this is the right place to ask If not please let me know! Looking for some help with the SQL statements in Access 2003 with the...
3
by: ryanjkoffler | last post by:
Hello... I have a single passthrough query where the possiblity for it to return zero records exists. If zero records will be returned, is there a way to add some logic that will catch this and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.