那位高手 帮我修改一下数据库连接
现在用的是access数据库 准确连接是
config.asp
'###### 数据库连接地址
Const Database = "\Dat\123.asa"
===========================================================
conn.asp
Option Explicit
Dim startime,Conn
Dim NowString
Dim ConnStr
Response.Buffer = True
startime = Timer()
'-----------------------ACCESS数据库连接----------------------------------------
NowString = "Now()"
'ACCESS数据库连接,请使用根路径或者绝对路径
Connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(Database)
ConnectionDatabase
'-------------------------------------------------------------------------------
Sub ConnectionDatabase()
On Error Resume Next
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open connstr
If Err Then
Err.Clear
Set conn = Nothing
Response.Write "<br><br><br><center><font
Response.End
End If
End sub
Sub CloseConn()
On Error Resume Next
If IsObject(Conn) Then
conn.close
set conn=nothing
end if
End Sub
Function safestr(str)
safestr=Replace(Replace(Replace(str,"'",""),";",""),"""","")
End Function
我想把access数据库升级成mssql2005 请问这个连接怎么修改? 知道的麻烦说下!