Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 11th, 2003, 08:00 AM
ckf ckf is offline
Registered User
 
Join Date: Sep 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default objRST.CacheSize

I used to use objRST.Cachesize to improve performance of the database lookups I was using, but I've since changed how I connect to a database which is faster, but now objRST.CacheSize no longer works.

Can someone tell me why?

This is the DB code I use:
Code:
Dim objConn
Dim objRST
Dim strSQL

Set objConn = Server.CreateObject("ADODB.Connection")
Set objRST = Server.CreateObject("ADODB.Recordset")

objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("/") & "\databases\db.mdb"

With objRST
   .Source = strSQL
   .ActiveConnection = objConn
   .CursorType = adOpenForwardOnly   
End With

objRST.Open ,,,, adCmdText

objRST.CacheSize = 100

I then use this to place results into an array.

Code:
If not objRST.EOF then
  arrResults = objRST.GetRows
End if

If isArray(arrResults) then
  intRecordCount = UBound(arrResults, 2) + 1
End if 

objRST.Close
This is the Error message I get:
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

What am I doing wrong here?

Many thanks
Craig.







Similar Threads
Thread Thread Starter Forum Replies Last Post
Error:Unrecognized configuration section cacheSize SKhna ASP.NET 2.0 Basics 0 February 15th, 2008 05:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.