<%
   
'数据库连接文件
On Error Resume Next
response.buffer=true 
Const DbType = "ACCESS" 'ACCESS:ACCESS数据库,SQL:为MSSQL数据库
dim SQLServerName,SQLDBUserName,SQLDBPassword,SQLDBName,datatype,conn,DB,ConnStr
SQLServerName = "(Local)" '服务器名称或地址 
	SQLDBUserName = "sa" '数据库帐号 
	SQLDBPassword = "123456789" '数据库密码 
	SQLDBName = "jle" '数据库名称 

If DbType="SQL" Then 
     ConnStr="Provider=sqloledb;user id="&SQLDBUserName&";password="&SQLDBPassword&";initial catalog="&SQLDBName&";data source="&SQLServerName&";"
   Else
     db="../data/#c@o&m%.mdb"
     ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db) 
   End If
Set conn = Server.CreateObject("ADODB.Connection") 
conn.Open connstr
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "<script Language=javascript>location.href = '对不起，访问量过高，您暂时无法登陆网站,请稍后访问！';</script>"
Response.End
End If
sub closedb()
     Set jle_User = Nothing
     Set jle_Fso = Nothing
	 Set jle_Temp = Nothing
	 If IsObject(Conn) = True Then Conn.Close
     Set Conn = Nothing
End Sub
%>
