asp关于查询显示问题
来源:百度知道 编辑:UC知道 时间:2024/06/25 06:22:46
我是想在上面窗口查询,下面框架显示的。
大虾帮我看看我的代码有问题没?
<!--#INCLUDE FILE="baomingqingkuang.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=gb2312" />
<title>无标题文档</title>
</head>
<body>
<!--#include file="conn.asp"-->
<%
dim cname
cname=request("cname")
cmd.commandtype=1
'cmd.commandtext="select * from Applicants where sNname='"&cname&"'"
' set rs=cmd.
大虾帮我看看我的代码有问题没?
<!--#INCLUDE FILE="baomingqingkuang.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=gb2312" />
<title>无标题文档</title>
</head>
<body>
<!--#include file="conn.asp"-->
<%
dim cname
cname=request("cname")
cmd.commandtype=1
'cmd.commandtext="select * from Applicants where sNname='"&cname&"'"
' set rs=cmd.
coon.asp如下:
<%
Db = "bmfy.mdb"
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db)
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open ConnStr
%>
-------------------------------------------------------
list.asp 如下:
<%
Set Rs=Server.CreateObject("ADODB.RecordSet")
strSQL ="SELECT * FROM [cname]"
Rs.Open strSQL,Conn,1,3
If NOT Rs.EOF Then
Do While NOT Rs.EOF
%>
<td> <%=Rs("学号")%></td>
<td> <%=Rs("性别")%></td>
<td> <%=Rs("姓名")%></td>
<%
Rs.MoveNext
Loop
End IF
RS.Close
%>
因为有段时间装不Office。我改数据库都是用这个显示和修改的