为什么正常查询能找到?
查询没有的记录就显示这个问题!
但为什么我也加了 什么第几条到第几条找到多少条?
如果没找到就显示 0条到第0条找到0条,为什么这个信息也不显示!而显示出错呢?
(1)页面出现这个效果
ADODB.Recordset 错误 '800a0bcd'
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,但应用程序要求操作的是当前的记录。
56
原文件
<%
Dim twe__MMColParam
twe__MMColParam = "1"
if (Request.QueryString("bt") <> "") then twe__MMColParam = Request.QueryString("bt")
%>
<%
set twe = Server.CreateObject("ADODB.Recordset")
twe.ActiveConnection = MM_nmkj_STRING
twe.Source = "SELECT * FROM new WHERE bt LIKE '%" + Replace(twe__MMColParam, "'", "''") + "%'"
twe.CursorType = 0
twe.CursorLocation = 2
twe.LockType = 3
twe.Open()
twe_numRows = 0
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
' set the record count
twe_total = twe.RecordCount
' set the number of rows displayed on this page
If (twe_numRows < 0) Then
twe_numRows = twe_total
Elseif (twe_numRows = 0) Then
twe_numRows = 1
End If
' set the first and last displayed record
twe_first = 1
twe_last = twe_first + twe_numRows - 1
' if we have the correct record count, check the other stats
If (twe_total <> -1) Then
If (twe_first > twe_total) Then twe_first = twe_total
If (twe_last > twe_total) Then twe_last = twe_total
If (twe_numRows > twe_total) Then twe_numRows = twe_total
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (twe_total = -1) Then
' count the total records by iterating through the recordset
twe_total=0
While (Not twe.EOF)
twe_total = twe_total + 1
twe.MoveNext
Wend
' reset the cursor to the beginning
If (twe.CursorType > 0) Then
twe.MoveFirst
Else
twe.Requery
End If
' set the number of rows displayed on this page
If (twe_numRows < 0 Or twe_numRows > twe_total) Then
twe_numRows = twe_total
End If
' set the first and last displayed record
twe_first = 1
twe_last = twe_first + twe_numRows - 1
If (twe_first > twe_total) Then twe_first = twe_total
If (twe_last > twe_total) Then twe_last = twe_total
End If
%>
Untitled Document <%=(twe.Fields.Item("bt").value)%>
Records <%=(twe_first)%> to <%=(twe_last)%> of <%=(twe_total)%>
<%
twe.Close()
%>
/TMP5db9kdg2fz.asp, 行56