Open classic ASP DB function not working
I migrated an asp classic asp site running on Windows Server 2003 to a Windows Server 2008, but suddenly this code stops working.
Const connStr_FC08 = "Provider=SQLNCLI10;Server=DS-47500;Database=TestDB;Uid=TestLogin;Pwd=test;Network=dbmssocn;"
Function connDB(OpenDB)
DIM conn
SET conn = Server.CreateObject("ADODB.Connection")
conn.open = connStr_FC08
If OpenDB = "Y" Then conn.open
connDB = conn
End Function
dim cn, cmd
cn = connDB("Y")
response.Write(cn.state)
This returns below error
Microsoft VBScript runtime error '800a01a8'
Object required: 'Provider=SQLNCLI10.1'
This happens in the line below
response.write(cn.state)
Thank you, Chris
0
Chris morledge
source
to share
3 answers