Hi there,
I use Microsoft Access 2000 as the backend and I would like to display a list of my products in the List.asp and by clicking on the product it takes the user to the detail page.
I use the getrows method to retrieve the records and display them using paging (ie 10 records per page)
*************************************************
List.asp:
<!--#include file="adovbs.inc" -->
<!--#include file="CommonStrings.asp" -->
<%
SQL = "SELECT * FROM PRODUCTS"
Set RS = Server.CreateObject("ADODB.Recordset"
RS.CursorLocation = adUseClient
RS.Open Sql, Conn , 2,2
DataArray = RS.GetRows
Conn.Close
Set Conn = Nothing
FOR i= 1 to 10 'For eg
ProductName= DataArray(Name,i)
'Displaying the List of items
%>
<a href="Detail.asp?MyQuery& "AbsPosition=" & i+1%"> <%=ProductName %> </a></td>
<% NEXT %>
***********************************************************
Details.asp?MyQuery& "AbsPosition=" & i+1
<!--#include file="adovbs.inc" -->
<!--#include file="CommonStrings.asp" -->
<%
AbsPosition = Request("AbsPosition"
Sql = "SELECT * FROM PRODUCTS"
Set RS = Server.CreateObject("ADODB.recordset"
RS.CursorLocation = adUseClient
RS.Open Sql, Conn ,2,2
If AbsPosition <> "" Then
RS.AbsolutePosition = CInt(AbsPosition)
End If
DataArray = RS.GetRows
Conn.Close
Set Conn = Nothing
FOR i= 1 to 1 'For eg
' The product details come here
NEXT
**********************************************************
When I run the list.asp without the step
RS.CursorLocation = adUseClient it was fine with no errors
But when I use that I get the error
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
**********************************************************
The reason I use the CursorLocation is because of my need to use the AbsolutePosition.
If I remove the RS.CursorLocation and try to go the Details.asp ends up with the following error.
**********************************************************
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.
**********************************************************
Pls find me a way to solve these problems.
Thanks in advance.
Faheemi
I use Microsoft Access 2000 as the backend and I would like to display a list of my products in the List.asp and by clicking on the product it takes the user to the detail page.
I use the getrows method to retrieve the records and display them using paging (ie 10 records per page)
*************************************************
List.asp:
<!--#include file="adovbs.inc" -->
<!--#include file="CommonStrings.asp" -->
<%
SQL = "SELECT * FROM PRODUCTS"
Set RS = Server.CreateObject("ADODB.Recordset"
RS.CursorLocation = adUseClient
RS.Open Sql, Conn , 2,2
DataArray = RS.GetRows
Conn.Close
Set Conn = Nothing
FOR i= 1 to 10 'For eg
ProductName= DataArray(Name,i)
'Displaying the List of items
%>
<a href="Detail.asp?MyQuery& "AbsPosition=" & i+1%"> <%=ProductName %> </a></td>
<% NEXT %>
***********************************************************
Details.asp?MyQuery& "AbsPosition=" & i+1
<!--#include file="adovbs.inc" -->
<!--#include file="CommonStrings.asp" -->
<%
AbsPosition = Request("AbsPosition"
Sql = "SELECT * FROM PRODUCTS"
Set RS = Server.CreateObject("ADODB.recordset"
RS.CursorLocation = adUseClient
RS.Open Sql, Conn ,2,2
If AbsPosition <> "" Then
RS.AbsolutePosition = CInt(AbsPosition)
End If
DataArray = RS.GetRows
Conn.Close
Set Conn = Nothing
FOR i= 1 to 1 'For eg
' The product details come here
NEXT
**********************************************************
When I run the list.asp without the step
RS.CursorLocation = adUseClient it was fine with no errors
But when I use that I get the error
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
**********************************************************
The reason I use the CursorLocation is because of my need to use the AbsolutePosition.
If I remove the RS.CursorLocation and try to go the Details.asp ends up with the following error.
**********************************************************
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.
**********************************************************
Pls find me a way to solve these problems.
Thanks in advance.
Faheemi