<%Response.Buffer = True
Dim sytleConnDB,tDb
const tIsSqlDataBase = 0
	tDb = "xlsdata/admin.mdb"
Sub styleConnDB()
	Dim ConnStr
	If tIsSqlDataBase = 1 Then
		sytleConnStr = "Provider = Sqloledb; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source = " & SqlLocalName & ";"
	Else
		sytleConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(tdb)
	End If
	'On Error Resume Next
	Set sytleConnDB = Server.CreateObject("ADODB.Connection")
	sytleConnDB.open sytleConnStr
	If Err Then
		err.Clear
		Set sytleConnDB = Nothing
		Response.Write "数据库连接出错，请检查连接字串。"&ConnStr '注释，需要把这几个字翻译成英文。
		Response.End
	End If
End Sub

Sub styleCloseDB()
	sytleConnDB.close
	Set sytleConnDB=Nothing
End Sub
%>