Use of GetRows Method 
Author Message
 Use of GetRows Method

I attempted to use the GetRows Method to speedup processing of an Access
Database recordset.  I get the following error:

********************** Start of Code*****************************
<tr>
  <td align="left" valign="top">
    <select NAME="Category">
      <option VALUE="0" selected>all</option>
<% Dim avarCategories, intRows, i
   Set rsCategories = OpenRecordset(cnUSI, "UniqueCategories")
   avarCategories = rsCategories.GetRows(adGetRowsRest) ' This is line
156
   Set rsCategories = CloseRecordset(rsCategories)
   For i = 0 to UBound(avarCategories, 2) %>
      <option value="<%=avarCategories(0,
i)%>"><%=Left(avarCategories(1, i),50)%></option>
<% Next
   Set avarCategories = Null %>
    </select>
  </td>
</tr>
********************** End of Code*****************************

********************** Start of error
Message*****************************
ADODB.Recordset error '800a0c93'

The operation requested by the application is not allowed in this
context.

/usi5/usi_home.asp, line 156
********************** End of error Message*****************************

Any Ideas???

Marvin Thompson



Wed, 18 Dec 2002 03:00:00 GMT  
 Use of GetRows Method
Hi Marvin,

I don't like the look of line 157.  Instead of

**********************************************
 Set rsCategories = CloseRecordset(rsCategories)
**********************************************

I'd try

**********************************************
rsCategories.close
**********************************************

Also, have you included the file adovbs.inc ?  Something else to try!


Quote:
> I attempted to use the GetRows Method to speedup processing of an Access
> Database recordset.  I get the following error:

> ********************** Start of Code*****************************
> <tr>
>   <td align="left" valign="top">
>     <select NAME="Category">
>       <option VALUE="0" selected>all</option>
> <% Dim avarCategories, intRows, i
>    Set rsCategories = OpenRecordset(cnUSI, "UniqueCategories")
>    avarCategories = rsCategories.GetRows(adGetRowsRest) ' This is line
> 156
>    Set rsCategories = CloseRecordset(rsCategories)
>    For i = 0 to UBound(avarCategories, 2) %>
>       <option value="<%=avarCategories(0,
> i)%>"><%=Left(avarCategories(1, i),50)%></option>
> <% Next
>    Set avarCategories = Null %>
>     </select>
>   </td>
> </tr>
> ********************** End of Code*****************************

> ********************** Start of error
> Message*****************************
> ADODB.Recordset error '800a0c93'

> The operation requested by the application is not allowed in this
> context.

> /usi5/usi_home.asp, line 156
> ********************** End of error Message*****************************

> Any Ideas???

> Marvin Thompson



Fri, 20 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem with Jscript and Recordset GetRows() method

2. GetRows() Method and Variant data type

3. GetRows method

4. GetRows Method for DAO

5. ADO Getrows method

6. How to check a empty array from the return of the method GetRows

7. GetRows method

8. MSDataShape Hierarchical RecordSets and the GetRows Method

9. GetRows Method, Now that is a surprise

10. MSChart control and GetRows method

11. GetRows Method

12. JScript using ASP GetRows?

 

 
Powered by phpBB® Forum Software