473,546 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

I'm doing this:
---------------------------------------------------------
5200 Case "Query"
On Error Resume Next
Set curQD = thisDB.QueryDef s(!ObjectName)
curErr = Err
On Error GoTo reconnect_PACE_ err
5210 Select Case curErr
Case 0
5221 curQD.Connect = !ConnectionStri ng
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=Ora cle ODBC Driver;UID=ABC; PWD=XYZ;TLO=O.. .....

After:
ODBC;DRIVER=Ora cle 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.TransferD atabase - 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 2698
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
2739
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, I'm to set the ReturnRecords property to False. I don't know how to do that in a pass thru query in Access 97. The help reads something like...
1
374
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 reconnect_PACE_err 5210 Select Case curErr Case 0 5221 curQD.Connect = !ConnectionString
7
10660
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 tables, but the query performed so poorly that I converted it to a Passthrough. Now it runs in a fraction of a second, but I no longer know how many...
4
10728
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
2762
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 Integrated security is used and anonymous is turned off.) This app will actually work as a child app for an Intranet app so when I remove the...
3
2610
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 2003 Server, ServerA, running as a Web Server that uses ASP.NET. The default.aspx file tries to access a file in a share on another computer,...
0
1374
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 and adds a couple of calculated fields when I create a second query using qryPlannedPUR that adds a specific WHERE clause I may or may not get the...
2
3607
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 tables backended into MS SQL Server 2005 The queries work fine but cause the forms to be quite slow if I leave them as is. If I convert the Queries...
3
1902
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 return one record with all fields filled with zeros instead of returning no records at all? If possible I would like to contain everything with-in this...
0
7435
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7694
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6026
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5360
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.