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.