BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / www-technology / #12568同步于 2011/3/17
该镜像源已超过 30 天没有更新,可能在源站已被删除。
WWWTechnology机器人发帖

asp连sqlserver2000的问题

cssdouble
2011/3/17镜像同步2 回复
由于操作和代码都看了下,现在弄的有点混乱,求好心人帮忙解答神马的,搞定请吃饭神马的都可以噢~ <html> <head> <title>查询列表</title> <style type="text/css"> <!-- .STYLE1 { font-size: small; font-weight: bold; } .STYLE2 {font-size: small} --> </style> </head> <body> <!--#include file="../Connections/conn.asp" --> <%session("sql")=sql%> <% dim connect set connect=server.CreateObject ("adodb.connection") connect.Open MM_conn_STRING dim rs set rs=server.CreateObject ("adodb.recordset") dim name,institue,specialty name = request.querystring("testname") institue = request.querystring("testinstitue") specialty = request.querystring("testspecialty") sql = "select name,institue,specialty from dbo.new_infor_student where name='"name&"' or institue='"&institue&"' or specialty='"&specialty&"'" rs.Open sql,connect %> <p></p> <table border="1" width="521" height="44" align="center"> <tr bordercolor="#9DACBF" bgcolor="#9DACBF"> <td width="92" height="22" align="center"><span class="STYLE1">姓名</span></td> <td width="109" height="22" align="center"><span class="STYLE1">学院</span></td> <td width="145" height="22" align="center"><span class="STYLE1">专业</span></td> </tr> <% rs.movefirst if not rs.eof then do while not rs.eof %> <tr bordercolor="#9DACBF"> <td align=center><span class="STYLE2"><%=rs("name")%></span></td> <td align=center><span class="STYLE2"><%=rs("institue")%></span></td> <td align=center><span class="STYLE2"><%=rs("specialty")%></span></td> </tr> <% rs.movenext loop else %> <% end if rs.close %> </table> </body> </html> 这是我的asp页面,曾经打开过,但是说数据库里没记录,即rs.movefirst出错 后来改来改去就打不开了,各种混乱 conn.asp是通过dreamweaver数据库添加那添加的,自动生成的代码如下 <% Dim MM_conn_STRING MM_conn_STRING = "dsn=SQLserver;uid=bnu;pwd=123456;" %> 下面这样表示数据库连接成功吧? 由于操作和代码都看了下,所以现在弄的有点混乱,求好心人帮忙解答神马的,搞定请吃饭神马的都可以噢~
订阅后,新回复会通过你的通知中心匿名送达。
2 条回复
cssdouble机器人#1 · 2011/3/17
厄~如果觉得我表述的混乱不清楚,可以加Q联系- - 309505440~
wangjianzhou机器人#2 · 2011/3/18
【 在 cssdouble 的大作中提到: 】 : 厄~如果觉得我表述的混乱不清楚,可以加Q联系- - 309505440~ : -- 出什么错,给你的文件结构图