ASP on Windows 2016. Connection to DB Oracle raises error 3706 - Provider cannot be found

mr anto 1 Reputation point
2021-07-01T12:29:44.033+00:00

I am migrating an old ASP (vbscript) application from a Windows 2003 server into a Windows 2016 64Bit server, where DB Oracle 18.0 is also installed.
Application uses ORAOLEDB.ORACLE provider to connect to DB. This is the code snippet used to get connection

Dim con, rs
set con = CreateObject("ADODB.Connection")
con.open ="provider=oraoledb.oracle;user id=xxx;password=yyy;data source=MyDB"
if err.number <> 0 then
    response.write "error<br>" & err.number & " - " & err.Description 
else
    response.write "connessione aperta"
end if
set rs = createobject("adodb.recordset")

rs.open "select count(*) as cnt from tgmi014 where yea=2020",con
response.write "found " & rs.fields(0).value & " items"
rs.close
set rs=nothing
con.close
set con=nothing

when executing con.Open, application crashes returning the above error message (3706 Provider cannot be found. It may not be properly installed)

Im sure TNSNAMES.ORA is correctly configured; in fact I can connect to DB via SQLPlus. I also tried to install ODAC 19.3 64Bit driver, and after registering ORAOLEDB19.DLL, ODAC connects to DB.

I also copied code snippet into a testdbconn.vbs file, and executed "cscript.exe testdbconn.vbs" from dos shell, getting the expected output.

Despite of all, ASP page fails. In IIS, I set Application Pools enabled to run 32Bit applications, but every test was unsuccessful.

ASP code was working on old Windows2003 server, whereas no ODAC was installed, so I suppose theres something on IIS to be set for it to work on Windows2016. How can I fix it?

thanks for help

Internet Information Services
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,252 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 55,601 Reputation points
    2021-07-01T13:29:20.247+00:00

  2. Bruce (SqlWork.com) 55,601 Reputation points
    2021-07-03T19:19:37.947+00:00

    you are using the com based adodb driver. see:

    http://docs.openlinksw.com/uda/lite/lite_oledb/

    0 comments No comments