问题描述:
dim conn
dim connstr
on error resume next
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/databases/#HH_HongNiang#.mdb")
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "This Connection is Error!"
Response.End
End If
Sub RsClose()
Rs.Close
Set Rs=Nothing
End Sub
上面这段代码是什么意思?
问题解答:
前面那段是建立数据库连接,后面那个sub是关闭连接及释放缓存