<%@ LANGUAGE = VBScript CodePage = 936%>
<%

Option Explicit
Response.Buffer=true
Dim conn
Dim connstr
Dim db,IsSqlDataBase
%>
<!--#Include File="../data_config.Asp"-->
<%
db="../"&db
set conn=server.createobject("adodb.connection")
IsSqlDataBase=1     '定义数据库类别，0为Access数据库，1为SQL数据库
If IsSqlDataBase=1 Then
'''''''''''''''''''''''''''''' Access数据库 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db)

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Else
Dim SqlLocalName
Dim SqlUserName
Dim SqlPassword
Dim SqlDatabaseName
'''''''''''''''''''''''''''''' SQL数据库 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
SqlLocalName   ="(local)"     '连接IP  [ 本地用 (local) 外地用IP ]
SqlUsername    ="sa"          '用户名
SqlPassword    ="wmjwmj"           '用户密码
SqlDatabaseName="myzone1"       '数据库名
ConnStr = "Provider=Sqloledb; User ID=" & SqlUsername & "; Password=" & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source=" & SqlLocalName & ";"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
End If
conn.open ConnStr
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "数据库连接出错，请检查连接字串。"'注释，需要把这几个字翻译成英文。
Response.End
End If
'On Error Resume Next

%>
