⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conn.asp

📁 一个适用于企业的客户电话咨询系统,可以与其它的相关企业管理系统进行整合!
💻 ASP
字号:
<%
'如果使用国外主页空间,请使用下面语句:
rem codepage="936"	
	dim conn
	dim connstr
	dim db
	'更改数据库名字
	db="data/telephone.mdb"
	on error resume next
	Set conn = Server.CreateObject("ADODB.Connection")

if err then 
	err.clear
	errormsg="<BR><li>操作失败,无法创建数据库对象!"
	call disperrs(errormsg)
	response.end
end if

	connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
	conn.Open connstr

if err then 
	err.clear
	errormsg="<BR><li>操作失败,无法创建数据库连接!"
	call disperrs(errormsg)
	response.end
end if

  	sub endConnection()
      		conn.close
      		set conn=nothing
  	end sub

sub disperrs(errormsg)
%>
<html><head>
<meta NAME=GENERATOR Content="Microsoft FrontPage 4.0" CHARSET=GB2312>
<title><%=version%>——错误提示</title>
<link rel=stylesheet type=text/css href=txl.css>
</head>
<body alink=#333333 vlink=#333333 link=#333333 topmargin=0>


<br><br>
    <table cellpadding=0 cellspacing=0 border=0 width=90% bgcolor=<%=TableborderColor%> align=center>
        <tr>
            <td>
                <table cellpadding=5 cellspacing=1 border=0 width=100%>
    <tr align="center"> 
          <td width="100%" bgcolor=<%=TabletitleColor%>><font color="<%=TableFontColor%>"><b><%=version%>错误信息</b></font></td>
    </tr>
    <tr> 
      <td width="100%" bgcolor=<%=TablebodyColor2%>><font color="<%=TableContentColor%>"><br><b>产生错误的可能原因:</b><br><br>
<li>您是否仔细阅读了<a href=help.asp><font color="<%=TableContentColor%>">帮助文件</font></a>
<%=errormsg%><br><br></font>
      </td>
    </tr>
    <tr align="center"> 
      <td width="100%" bgcolor=<%=TabletitleColor%>>
<a href="javascript:history.go(-1)"><font color="<%=TableFontColor%>"> << 返回上一页</font></a>
      </td>
    </tr>  
    </table>   </td></tr></table>
<%
end sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -