CacheLimit - ODBCResultSet

We are in the process of moving from Notes 5.05 to 6.5.1. I’ve encountered an issue with CacheLimit that runs fine in v5 but not in v6.5. If CacheLimit is set to DB_ALL, my understanding is that all records should be available for a second look. We’re only talking about 10 rows in this case and all is fine in v5 but in v6.5 once you have passed a row, you can’t go back, nor does resultset.FirstRow work. Found that if instead of setting CacheLimit to DB_ALL (equates to 0), it is set to 50 (arbitrary), everything is fine. All I can think of is that setting it to 0 gives you just that, 0 rows in cache. Has anyone seen this issue or have I missed something?

Public Function LookupProcessOrder(ponum As String) As ODBCResultSet

Dim con As New ODBCConnection

Dim qry As New ODBCQuery

Dim result As New ODBCResultSet



Call	con.connectto("GBDS", "comxclient", "comxclient")

If Not con.IsConnected Then

	Messagebox "Could not connect to GBDS.  Check ODBC connection",, "Error"

	Set		LookupProcessOrder = result

	Exit Function

End If

Set qry.Connection = con

Set result.Connection = con

’ 2/02/05 For some reason (bug!!) when set cachelimit to DB_ALL (0) this doesn’t execute properly in v6.5 - works fine in v5

’ so set to 50 - way more than we should get

’ result.CacheLimit = DB_ALL

result.CacheLimit = 50



If ponum = "" Then

	PONum = Inputbox ("Enter Process Order #")		

End If



qry.SQL="Execute spLocal_MSPD_Notes_Header  " &  PONum 



Set result.Query = qry	

result.Execute	

*** in v6.5 this fails

status = result.FirstRow

If status = False Then

	Msgbox "Couldn't position to first row",, "Bad, bad, bad..."

End If



If Not result.IsResultSetAvailable Then

	Msgbox "Couldn't obtain data for process order " + PONum,, "No data"

End If



Set	LookupProcessOrder = result

End Function