<!--#include file="Class_Safe.asp" -->

<%
Response.Buffer = True
'On Error Resume Next
Dim Conn,Connstr
Dim Sqldatabase,Sql_pass_word,Sql_User_ID,Sql_Data_Source

Sqldatabase="tidcjob1Data" '填写数据库的名称           
Sql_pass_word="123456"   '数据库的密码
Sql_User_ID="sa"      '数据库的用户名
Sql_Data_Source="(local)" '数据库的地址	
Set Conn = Server.CreateObject("ADODB.Connection")
ConnStr = "Provider=SQLOLEDB.1;Password='"&Sql_pass_word&"';Persist Security Info=False;User ID='"&Sql_User_ID&"';Initial Catalog='"&Sqldatabase&"';Data Source='"&Sql_Data_Source&"'"	
Conn.Open Connstr

Function CloseDB
 Conn.close
 Set conn = Nothing
End Function

Function CloseRs
 Rs.Close
 Set Rs = Nothing
End Function

If Err Then
	err.Clear
	Set Conn = Nothing
	Response.Write "数据库连接出错，请检查连接字串。"
	Response.End
End If

%>
