<%
On Error Resume Next
	Dim ConnStr,conn
Response.Charset="gb2312"
Response.Buffer=True
IsSqlDataBase=1		'定义数据库类别，0为Access数据库，1为SQL数据库
If IsSqlDataBase=0 Then
'''''''''''''''''''''''''''''' Access数据库设置 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
	SqlDataBase	= "/date/516dataa.mdb"	'数据库路径
	SqlProvider	= "Microsoft.Jet.OLEDB.4.0"	'驱动程序[ Microsoft.Jet.OLEDB.4.0  Microsoft.ACE.OLEDB.12.0 ]
	Connstr="Provider="&SqlProvider&";Data Source="&Server.MapPath(SqlDataBase)
	SqlNowString="Now()"
	SqlChar="'"
	IsSqlVer="ACCESS"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Else
'''''''''''''''''''''''''''''' SQL数据库设置 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
	SqlLocalName	="."	'连接IP  [ 本地用 (local) 外地用IP ]
	SqlUserName	="sa"		'SQL用户名
	SqlPassword	="516data516data"		'SQL用户密码
	SqlDataBase	="516dataa"	'数据库名
	SqlProvider	="SQLOLEDB"	'驱动程序 [ SQLOLEDB  SQLNCLI ]
	Connstr = "PROVIDER="&SqlProvider&";DATA SOURCE="&SqlLocalName&";UID="&SqlUserName&";PWD="&SqlPassword&";DATABASE="&SqlDataBase 
	SqlNowString="GetDate()"
	IsSqlVer="MSSQL"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
END IF
On Error Resume Next
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.open ConnStr
If Err Then
	Response.Write ""&IsSqlVer&"数据库连接出错，请检查连接字串。<br><br>"&Err.Source&" ("&Err.Number&")"
	Set Conn = Nothing
	err.Clear
	Response.End
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
%>
