<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
Response.Buffer = True
On Error Resume Next
'以下两种数据库类型连接方法请根据情况选择使用
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set wConn       = Server.CreateObject("ADODB.Connection")
Sqldatabase     = "BingSNS_Client"
Sql_pass_word   = "janis"
Sql_User_ID     = "sa"
Sql_Data_Source = "127.0.0.1"

'SQL2000
wConnStr = "Provider=SQLOLEDB.1;Password='"&Sql_pass_word&"';Persist Security Info=False;User ID='"&Sql_User_ID&"';Initial Catalog='"&Sqldatabase&"';Data Source='"&Sql_Data_Source&"'"	
wConn.Open wConnstr

'SQL2005
'wConnStr = "Provider = SQLNCLI; User ID = " & Sql_User_ID & "; Password = " & Sql_pass_word & "; Initial Catalog = " & Sqldatabase & "; Data Source = " & Sql_Data_Source & ";"
'wConn.Open wConnstr

'SQL2008
'wConnStr = "PROVIDER=SQLOLEDB;DATA SOURCE=" & Sql_Data_Source &";database="& Sqldatabase & ";User Id=" & Sql_User_ID & ";PASSWORD=" & Sql_pass_word & ";"
'wConn.open wConnStr
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set mConn        = Server.CreateObject("ADODB.Connection")
mSqldatabase     = "BingSNS_Mess"
mSql_pass_word   = "janis"
mSql_User_ID     = "sa"
mSql_Data_Source = "127.0.0.1"

'SQL2000
mConnStr = "Provider=SQLOLEDB.1;Password='"&mSql_pass_word&"';Persist Security Info=False;User ID='"&mSql_User_ID&"';Initial Catalog='"&mSqldatabase&"';Data Source='"&mSql_Data_Source&"'"	
mConn.Open mConnstr

'SQL2005
'mConnStr = "Provider = SQLNCLI; User ID = " & mSql_User_ID & "; Password = " & mSql_pass_word & "; Initial Catalog = " & mSqldatabase & "; Data Source = " & mSql_Data_Source & ";"
'mConn.Open mConnstr

'SQL2008
'mConnStr = "PROVIDER=SQLOLEDB;DATA SOURCE=" & mSql_Data_Source &";database="& mSqldatabase & ";User Id=" & mSql_User_ID & ";PASSWORD=" & mSql_pass_word & ";"
'mConn.Open mConnStr
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
%>