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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access/Oracle logon problem

Status
Not open for further replies.

synapse5150

Programmer
Sep 30, 2009
2
US
I wasn't quite sure where to post this (VB, Acccess, Oracle), but here's the problem. I have an application that runs an Access query and displays the results to the user. The problem is that the query has a join to an Oracle view, and when the query runs, Access prompts the user to enter an Oracle password, which the user does not have permission to have. I tried to connect to Oracle through VB before running the query but still get the prompt. Is there a way to provide Access the password for Oracle in the connection string? Here are the 2 connection strings I am using:

Sub Oracle_Connection()
With adoCon2
If .State = adStateClosed Then
.CommandTimeout = 0
.CursorLocation = adUseClient
.Open "Data Source=" & ORPATH & ";User Id=" & USER & ";Password=" & SHEETPASS & ";PLSQLRSet=1;"
Else
.Close
End If
End With
End Sub

Sub Access_Connection()
With adoCon
If .State = adStateClosed Then
.CommandTimeout = 0
.Open "Provider=" & ACPRO & "Data Source=" & ACPATH & ACNAME & ";Jet OLEDB:Database Password=" & SHEETPASS
Else
.Close
End If
End With
End Sub

Thank you in advance for any advise-
 
If you're using the view as a linked table in Access you can check the Save Password box when you link it.

That might help the problem.

HarleyQuinn
---------------------------------
Carter, hand me my thinking grenades!

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before post

 
Thanks- I love it when the answers are easy! That worked (never noticed the 'save password' checkbox before.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top