Oracle Stored Procedure / File Dsn

This works in MS Access calling an Oracle Stored using System DSN
 Dim cn1
     Set cn1 = CreateObject("ADODB.CONNECTION")
     cn1.ConnectionString = "dsn=rhtora1-lawprod2;uid=abc;,pwd=xyz;"
     Dim cmd
     Set cmd = CreateObject("adodb.command")
     Set cmd.activeconnection = cn1
     cmd.commandtext = "qws_procedure"
     cmd.commandtype = 4
We are switching to use File DSN instead of System DSN
Changed several parts of this code but still did not work
Who is Participating?
chaauConnect With a Mentor Commented:
What is your provider for cn1 connection? I think it is MSDASQL (it is always a good idea to specify the provider).
If you wish to use File DSN for Microsoft OLE DB Provider for ODBC you need to use this syntax:
"Provider=MSDASQL; FileDSN=filename ; UID=user; PWD=password"

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.