473,398 Members | 2,525 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,398 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 2687
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.