BUG: Recordset Displays Previous Page's Data When FilteringLast reviewed: March 18, 1998Article ID: Q178828 |
The information in this article applies to:
SYMPTOMSWhen using the Filter property in ActiveX Data Objects (AD0) version 1.5 in conjunction with the AbsolutePaging and PageSize properties, the recordset returned from the database displays the same record or records on multiple pages. This scenario is common when you use Filtering in DataForm Wizard generated Active Server Pages (ASP) pages. For example, using a table that contains 22 records in an ASP page that is set to paginate after 10 records, shows records from the first page on the second and third pages when a Filter has been applied to that result set.
CAUSEThe following conditions cause this error to occur:
RESOLUTIONThere are two possible workarounds:
In xxxList.ASP and xxxForm.ASP, go to the following section and add the line marked with the asterisk below:
<% If fNeedRecordset Then Set conn= Server.CreateObject("ADODB.Connection") conn.ConnectionTimeout = Session("conn_ConnectionTimeout") conn.CommandTimeout = Session("conn_CommandTimeout") conn.Open Session("conn_ConnectionString"), Session("conn_RuntimeUserName"), Session("conn_RuntimePassword") Set cmdTemp = Server.CreateObject("ADODB.Command") Set rs= Server.CreateObject("ADODB.Recordset") cmdTemp.CommandText = "SELECT * FROM dbo.""tblSched""" cmdTemp.CommandType = 1 Set cmdTemp.ActiveConnection = conn rs.CursorLocation = 3 ' ***** Add this line (3 is the same a adUseClient) rs.Open cmdTemp, , 1, 4 'Change locktype to OptimisticBatch. End If %> STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
REFERENCESFor the latest Knowledge Base articles and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:
http://support.microsoft.com/support/vinterdev/ |
Additional query words: Cursor ADO 1.5 Filtering
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |