<%@  codepage=65001%>
<%
Response.Buffer = True
response.charset="utf-8"
session.codepage=65001
%>
<!--#include file="include/Lebi_Data.asp"-->
<%
On Error Resume Next
Dim SqlNowString,Conn,Db,startime,pass
startime=timer()
If IsSqlDataBase = 1 Then
        SqlNowString = "GetDate()"
Else
        Db = "database/"&dbname&""
        SqlNowString = "Now()"
End If
Sub connopen
		Dim ConnStr
		If IsSqlDataBase = 1 Then
			ConnStr = "Provider = Sqloledb; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source = " & SqlLocalName & ";"
		Else
			ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password="&pass&";Data Source = " & Server.MapPath(MyDbPath & db)
		End If
		Set conn = Server.CreateObject("ADODB.Connection")
		conn.open ConnStr
		On Error Resume Next
		If Err Then
			err.Clear
			Set Conn = Nothing
			Response.Write "数据库连接出错！"
			Response.End
		End If
End Sub 
Sub connclose()
		conn.close
		Set conn=Nothing 
End Sub 
If Not IsObject(conn) Then 
      connopen()
Else
      connclose()
End If 
%>
