<%@ LANGUAGE = VBScript CodePage = 936%>
<%
Option Explicit
Response.Buffer = True
Dim Dataname,Startime,Conn,Db
Dim SqlString
Dim ConnStr
Startime = Timer()
Const IsSqlDataBase = 0 '定义数据库类别，1为SQL数据库，0为Access数据库
Call OpenConn()
On Error Resume Next
Sub OpenConn()
	On Error Resume Next
	Db = "MyData/zhidao5756.mdb" '数据库目录和名称,请使用绝对路径.
	SqlString = "Now()"
	ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(Db)
	Set conn = Server.CreateObject("ADODB.Connection")
	conn.open ConnStr
	If Err Then
		err.Clear
		Set Conn = Nothing
		Response.Write "数据库连接出错，请检查连接字串。"
		Response.End
	End If
End Sub
'-----------------------------------------------------------------------------------------------------
Sub CloseConn()
	On Error Resume Next
	If IsObject(DownSys) Then
		Set DownSys = Nothing
	End If
	If IsObject(Conn) Then
		Conn.Close
		Set Conn = Nothing
	End If
End Sub
%>
