anthony peiris
6th December 2010, 18:55
:eek:I am trying to fetch set of records using olesql_fetch.

When it hits the last record, the function do not return any error code(Error=0, ReturnValue="0") , but keep repeating the last record..

How do I determine if fetch has reached last record ?

Thanks

Anthony

mark_h
6th December 2010, 20:17
Here is what I tested once before:


Query = "select tiitm001.* from tiitm001 where tiitm001.item = 'PLM7249020'"

B_function = "olesql_parse(" & Chr(34) & Query & Chr(34) & ")"
' execute the function olesql_parse from DLL ottdllsql_query
BaanObj.ParseExecFunction "ottdllsql_query", B_function

query_id = Val(BaanObj.ReturnValue)
If query_id = 0 Then
MsgBox "function olesql_parse fails"
End If