<%Dim rs,conn
  '过程：连接数据库
  sub getConn()
  	Dim strProvider
	Set rs=Server.CreateObject("ADODB.Recordset")
	Set conn=Server.CreateObject("ADODB.Connection")
	strProvider="Provider=sqloledb;Data Source=.;Initial Catalog=AddressBook;User ID=sa;Password=sql;"
	conn.open strProvider
	If conn.Errors.Count>0 Then
		Response.Write("数据库连接失败!")
		Set rs=nothing
		Set conn=nothing
		Response.End
	End If
  End sub
%>