找回密码
 注册
搜索
热搜: 回贴
  • 前程无忧官网首页 有什么好的平台可以
  • 最新的销售平台 互联网营销的平台有哪
  • 制作网页的基本流程 网页制作和网页设
  • 【帝国CMS】输出带序号的列表(数字排
  • 网站建设公司 三一,中联,极东泵车的
  • 织梦 建站 织梦网站模版后台怎么更改
  • 云服务官网 哪些网站有免费的简历模板
  • 如何建网站要什么条件 建网站要用什么
  • 吉林市移动公司电话 吉林省退休人员网
  • 设计类毕业论文 网站设计与实现毕业论
查看: 100|回复: 9

为什么我查询总是只能查询到一个人的信息?

[复制链接]
发表于 2010-1-7 05:50:20 | 显示全部楼层 |阅读模式 IP:江苏扬州
初次接触ASP 做了个比较简单的查询界面
为什么我随便用哪个登陆名查询 都只能查询到同一个人的资料啊?
大概意思就是这样 有碰到过同样问题的朋友吗? 有知道的大侠吗?
知道麻烦跟我说下
加我QQ说也可以 6010829 顺便还可以教我点知识 呵呵
加的时候麻烦著名一下是本论坛朋友 谢谢
发表于 2010-1-7 05:50:23 | 显示全部楼层 IP:江苏扬州
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("username") <> "") Then
Recordset1__MMColParam = Request.QueryString("username")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_conn_STRING
Recordset1.Source = "SELECT * FROM dbo.usertable WHERE username = '" + Replace(Recordset1__MMColParam, "'", "''") + "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<%
Dim MM_paramName
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth
Dim MM_removeList
Dim MM_item
Dim MM_nextItem
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then
MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "") Then
MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
回复

使用道具 举报

发表于 2010-1-7 05:50:26 | 显示全部楼层 IP:江苏扬州
文件.asp?username=值
回复

使用道具 举报

发表于 2010-1-7 05:50:29 | 显示全部楼层 IP:江苏扬州
初少确认你的
  1. Request.QueryString("username")
复制代码
没有取到值..把你前面的一个页面代码发出来..
回复

使用道具 举报

发表于 2010-1-7 05:50:32 | 显示全部楼层 IP:江苏扬州
上面就是代码了 剩下的只有页面基本的代码和数据集的绑定 就没发了
麻烦各位老大给分析一下 谢谢
回复

使用道具 举报

发表于 2010-1-7 05:50:35 | 显示全部楼层 IP:江苏扬州
我也知道应该是没取到值。。可就是不知道该怎么把值从注册页面传过去。。
哎 刚学的 啥都不懂
回复

使用道具 举报

发表于 2010-1-7 05:50:38 | 显示全部楼层 IP:江苏扬州
你把你的代码发上来大家看看啊
不过据推测你应该是没循环
回复

使用道具 举报

发表于 2010-1-7 05:50:41 | 显示全部楼层 IP:江苏扬州
顶一下!都对!!
回复

使用道具 举报

发表于 2010-1-7 05:50:44 | 显示全部楼层 IP:江苏扬州
楼上正解.
回复

使用道具 举报

发表于 2010-1-7 05:50:47 | 显示全部楼层 IP:江苏扬州
2楼说的没错
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|最新主题|手机版|微赢网络技术论坛 ( 苏ICP备08020429号 )

GMT+8, 2024-9-29 23:33 , Processed in 0.367342 second(s), 13 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表