Hi all,
I'm connecting to an Oracle database thru code via DSN. Here's what I have:
I'm harcoding the userid and password in the above code but when my app tries to connect to an Oracle table I still get a propmt for the user to input the userid and password. Is there a way to avoid this?
Thanks!
I'm connecting to an Oracle database thru code via DSN. Here's what I have:
Code:
Dim nRet As Long
Dim sDriver As String
Dim sAttributes As String
sDriver = "Oracle73 Ver 2.5"
sAttributes = "Server=PRA1" & Chr$(0)
sAttributes = sAttributes & "DESCRIPTION=" & sDSN & Chr$(0)
sAttributes = sAttributes & "DSN=DSNNAME" & Chr$(0)
sAttributes = sAttributes & "DATABASE=DB" & Chr$(0)
sAttributes = sAttributes & "UID=userid" & Chr$(0)
sAttributes = sAttributes & "PWD=password" & Chr$(0)
DBEngine.RegisterDatabase "currentRegistrations", "Oracle73 Ver 2.5", True, sAttributes
I'm harcoding the userid and password in the above code but when my app tries to connect to an Oracle table I still get a propmt for the user to input the userid and password. Is there a way to avoid this?
Thanks!