CursorSetProp() does the trick. However, CursorSetProp("FetchSize",-1,0) did not return all the rows. Instead I used
>
>CursorSetProp("MaxRecords", -1, 0)
>
and it gives me correct results.
Thanks
>Hi,
>
>There is a set of CURSORSETPROP() commands which can be executed to force the behavior. In your case is
>
>
>CursorSetProp("FetchSize",-1,0)
>
>
>CursorSetProp() function may look as a vicious circle at first glance. One need to set the cursor property before getting the cursor through SQLExec(). General synthax of CursorSetProp() is
>
>
>CURSORSETPROP( cProperty [, eExpression] [,cTableAlias | nWorkArea])
>
>
>If you try to set the property of an inexisting cursor, an error is generated. The trick is to use 0 as nWorkArea. If the function sets the property of work area 0 (which actually does not exist), all future cursors will "inherit" this value. In other words, set the property once and it becomes default. The same trick is true for SQLSetProp(), when you don't have a connection handle yet.
>
>Hope this helps,
>
>>When I issue the following SQLExec(), I got a maximum of 100 rows in MyCursor. What do I need to do to retrieve all rows to MyCursor?
>>
>>SQLResult = sqlexec(h, "select * from MySQLTable", "MyCursor")
>>do while SQLResult == 0
>> SQLResult = sqlexec(h)
>>enddo
>>
>>
>>Thanks
James Chan
ObjectMastery Pty Ltd