| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 615 人关注过本帖
标题:[求助]请问一下这个代码应该怎么写?
取消只看楼主 加入收藏
lihaoru
Rank: 1
等 级:新手上路
帖 子:74
专家分:0
注 册:2004-11-11
收藏
 问题点数:0 回复次数:4 
[求助]请问一下这个代码应该怎么写?
m_CallerID 取到值以后跳出页面: http://localhost/wwww/ddd.asp?m_CallerID=2102 页面上显示 第 1 页,共 2页 但当我做了一个下一个的按钮以后就出现

Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

ADODB.Recordset 错误 '800a0bcd'

BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。

/wwww/ddd.asp,行66 URL是:http://localhost/wwww/ddd.asp?m_CallerID=2102curpage=2 我想问一下我的写法是不是有问题 Response.Write("<INPUT TYPE=BUTTON VALUE=NEXT ONCLICK=""document.location.href='ddd.asp?m_CallerID=" & CallerID & "curpage=" & curpage + 1 & "';"">") 请帮忙,谢谢

[此贴子已经被作者于2005-10-20 13:09:16编辑过]

搜索更多相关主题的帖子: 代码 
2005-10-20 13:00
lihaoru
Rank: 1
等 级:新手上路
帖 子:74
专家分:0
注 册:2004-11-11
收藏
得分:0 

<!--#include file="config.asp"--> <!--#include file="conn.asp"--> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>无标题文档</title> <script language="vbscript" runat="server"> '''电话号码转换 function change(callid) if mid(callid,1,2) = "13" then change = callid elseif mid(callid,1,3) = "013" then change = callid elseif len(callid) >= 11 then change = mid(callid,len(callid)-6,7) else change = callid end if end function '''''''''''''''''''''''''''''''''''''''''''''''' Function DataToRsStatic(Conn,strSql) Dim RsStatic On Error Resume NexT Set DataToRsStatic = Nothing If Conn Is Nothing Then Exit Function End If Set RsStatic = CreateObject("ADODB.RecordSet") RsStatic.CursorLocation = 3 RsStatic.Open strSql,Conn,3,3 If Err.Number <> 0 Then Exit Function End If set DataToRsStatic = RsStatic End Function

</script> </head>

<body> <% '''''''''''''''''''''''''''''''''''''''''''' Const NumPerPage = 1 ''''''''''''''''''''''''''''''''''''''''''''' Dim CurPage If Request.QueryString("CurPage") = "" then CurPage = 1 'We're on the first page Else CurPage = Request.QueryString("CurPage") End If ''''''''''''''''''''''''''''''''''''''''''''

''''''''''''''''''''''''''''''''''''''''''''

dim CallerID CallerID = request.QueryString("m_CallerID") CallerID = change(CallerID) Dim conn Set Conn = CreateObject("ADODB.Connection") conn.open "DRIVER={SQL Server};SERVER=192.168.0.100;DATABASE=Zsa;UID=sa;PWD=dss" strSql = "SELECT * FROM T_Customerinfo where Chandset1 = '" & CallerID & "' or Chandset2 = '" & CallerID & "' or Ctel like '" & CallerID & "'" set rstData = DataToRsStatic(conn, strSql)

'rstData.CacheSize = NumPerPage

rstData.MoveFirst rstData.PageSize = NumPerPage

Dim TotalPages TotalPages = rstData.PageCount rstData.AbsolutePage = CurPage

Dim count Count = 0 Do While Not rstData.EOF And Count < rstData.PageSize response.write("注册帐号:"& rstData("Cnickname")) response.write("<br>会员姓名:"& rstData("Cname")) response.write("<br>性别:"& rstData("Csex")) response.write("<br>家庭住址:"& rstData("Caddress")) response.Write("<br>手机1:"& rstData("Chandset1")) response.Write("<br>手机2:"& rstData("Chandset2")) response.Write("<br>固定电话区号:"& rstData("Ctelfirst")) response.Write("<br>固定电话号码:"& rstData("Ctel")) response.Write("<br>是否黑名:"& rstData("Cblack")) response.Write("<br>会员状态:"& rstData("Cstatus")) response.Write("<br>消费积分:"& rstData("Cconsumescore")) response.Write("<br>会员积分:"& rstData("Cscore")) response.Write("<br>会员级别"& rstData("Clevel")) Count = Count + 1 rstData.MoveNext Loop Response.Write("<br>第 " & CurPage & " 页,共 " & TotalPages & "页<P>") rstData.Close Set rstData = nothing conn.close Set conn=Nothing '显示 Next / Prev 按钮 if CurPage > 1 then Response.Write("<INPUT TYPE=BUTTON VALUE=PREV ONCLICK=""document.location.href='ddd.asp?m_CallerID=" & CallerID & "curpage=" & curpage - 1 & "';"">") End If

if CInt(CurPage) <> CInt(TotalPages) then Response.Write("<INPUT TYPE=BUTTON VALUE=NEXT ONCLICK=""document.location.href='ddd.asp?m_CallerID=" & CallerID & "curpage=" & curpage + 1 & "';"">") End If

%> </body> </html>

[此贴子已经被作者于2005-10-20 13:18:40编辑过]

2005-10-20 13:16
lihaoru
Rank: 1
等 级:新手上路
帖 子:74
专家分:0
注 册:2004-11-11
收藏
得分:0 
请大家帮帮忙,谢谢了
2005-10-20 13:43
lihaoru
Rank: 1
等 级:新手上路
帖 子:74
专家分:0
注 册:2004-11-11
收藏
得分:0 
请大家帮帮忙
2005-10-20 14:48
lihaoru
Rank: 1
等 级:新手上路
帖 子:74
专家分:0
注 册:2004-11-11
收藏
得分:0 
数据库里有东西的,会显示有2页的
2005-10-21 09:33
快速回复:[求助]请问一下这个代码应该怎么写?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.027112 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved