the_utmost
Registered User.
- Local time
- Today, 10:51
- Joined
- Mar 10, 2005
- Messages
- 40
Hi:
I am opening up a remote database and I have a syntax problem. I know how to open up my report with DAO but I need to open it with ADO. I have code for both but I am still getting prompted for the DSN User Name and password. Here is my code.
Dim AccessApp As Access.Application
Set AccessApp = CreateObject("access.application")
AccessApp.OpenCurrentDatabase (strPath) '* I get prompted for the user name & password here.
I have the code for an ADO connection, but I need to put 2 + 2 together. Here is my database connection code:
Public Sub OpenRemoteDatabase()
Set cn = New ADODB.Connection
cn.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Extended Properties=DSN=RPT_TRIDENTPROD;UID=RPT;PWD=RPT;DBQ=TRIDENTPROD;" cn.Open
End Sub
How can I open up my Access App object with ADO like above?
I am opening up a remote database and I have a syntax problem. I know how to open up my report with DAO but I need to open it with ADO. I have code for both but I am still getting prompted for the DSN User Name and password. Here is my code.
Dim AccessApp As Access.Application
Set AccessApp = CreateObject("access.application")
AccessApp.OpenCurrentDatabase (strPath) '* I get prompted for the user name & password here.
I have the code for an ADO connection, but I need to put 2 + 2 together. Here is my database connection code:
Public Sub OpenRemoteDatabase()
Set cn = New ADODB.Connection
cn.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Extended Properties=DSN=RPT_TRIDENTPROD;UID=RPT;PWD=RPT;DBQ=TRIDENTPROD;" cn.Open
End Sub
How can I open up my Access App object with ADO like above?
Last edited: