asp老师请进。我是一个刚刚起步学习asp的学生,我做了一个asp的查询页面。但是总部无法正常运行。请看代码
<%@LANGUAGE="VBSCRIPT"CODEPAGE="65001"%><!--#includefile="conn.asp"--><!DOCTYPEhtmlPU...
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>testconn</title>
</head>
<body>
<center>
<hr>
<%
sql="select * from cust_info_asp where id=1"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,1,1
if not rs.eof then
%>
<table width="461" border="1" cellspacing="1" cellpadding="1">
<tr>
<td width="62">ID</td>
<td width="104">companyname</td>
<td width="212">address</td>
<td width="27">tel</td>
<td width="28">name</td>
</tr>
<tr>
<td><%=rs("id")%></td>
<td><%=rs("company_name")%></td>
<td><%=rs("address")%></td>
<td><%=rs("tel")%></td>
<td><%=rs("fuzeren")%></td>
</tr>
</table>
</center>
</body>
</html> 展开
<!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>testconn</title>
</head>
<body>
<center>
<hr>
<%
sql="select * from cust_info_asp where id=1"
set rs=server.createobject("adodb.recordset")
rs.open sql,connstr,1,1
if not rs.eof then
%>
<table width="461" border="1" cellspacing="1" cellpadding="1">
<tr>
<td width="62">ID</td>
<td width="104">companyname</td>
<td width="212">address</td>
<td width="27">tel</td>
<td width="28">name</td>
</tr>
<tr>
<td><%=rs("id")%></td>
<td><%=rs("company_name")%></td>
<td><%=rs("address")%></td>
<td><%=rs("tel")%></td>
<td><%=rs("fuzeren")%></td>
</tr>
</table>
</center>
</body>
</html> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询