<%
Const is_sqldatas=0
Dim connstrs,conns,dbs,dchrs,delchrs
Dim userDBs
	If is_sqldatas=0 Then
		
		dbs ="/manage/Database/Howave4.mdb"
		connstrs="DBQ="+server.mappath(dbs)+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"  'access数据库联接
		dchrs="#"
		delchrs=" * "
	Else
		'sql数据库连接参数：数据库名、用户密码、用户名、连接名（本地用local，外地用IP）
		Dim sql_databasenames,sql_passwords,sql_usernames,sql_localnames
		sql_localnames = "(local)"
		sql_databasenames = ""
		sql_usernames = ""
		sql_passwords = ""
		connstrs = "Provider = Sqloledb; User ID = " & sql_usernames & "; Password = " & sql_passwords & "; Initial Catalog = " & sql_databasenames & "; Data Source = " & sql_localnames & ";"
		dchrs="'"
		delchrs=" "
	End If
	On Error Resume Next
	Set conns = Server.CreateObject("ADODB.Connection")	
	conns.open connstrs
	If err then
		err.clear
		Set conns= nothing
		response.write "数据库连接出错，请检查连接字串。"
		response.End
	End If
	   
%>