ASP数据库连接文件
<%Dim DataBase,Conn,ConnStr
DataBase = "DataBase.mdb"
Set Conn = Server.CreateObject("ADODB.Connection")
ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(DataBase)
If Err Then
Err.Clear
Else
Conn.Open ConnStr
End If
Sub CloseConn()
Conn.Close
Set Conn = Nothing
End Sub
%>
大家觉得这具数据库连接文件如何,有何不足之处吗?