<%
Response.CodePage=936
Response.Charset="GB2312"
Session.Timeout=999
Server.ScriptTimeout=99999

Dim Datetype
Datetype="2" '数据库连接类型(当为1时数据库SQL2000,如果值为2则为SQL2005)

Dim DB_ConnStr,DB_Path,Conn,DB_Sql,DB_RS,Rs,SQL

If Datetype="1" Then

Set Conn = Server.CreateObject("ADODB.Connection")
DB_ConnStr = "Driver={SQL Server};Server=(Local);NETWORK=DBMSSOCN;UID=sa;PWD=123456;DATABASE=QCCRMV5;" 
On Error Resume Next
Conn.Open DB_ConnStr

ELSEIF Datetype="2" Then
Set Conn = Server.CreateObject("ADODB.Connection")
DB_ConnStr = "PROVIDER=SQLOLEDB;DATA SOURCE=(Local);UID=sa;PWD=123456;DATABASE=QCCRMV5" 
On Error Resume Next
Conn.Open DB_ConnStr

END IF

If Err.Number <> 0 Then
   Err.Clear
   Conn.Close
   Set Conn = Nothing
   Response.Write "青辰技术提醒您：对不起,数据库连接出错,请与管理员联系!"
   Response.End
End If
%>