Hi Dennis,
I had to look into the code first, 'cause we did this several years ago...
So first I have to correct myself, as we use both properties. Basically the code looks like this (a bit modified as the now used variables are usually properties of our application object:
liRecords = 200
liStatus = 0
lcCursor = SYS( 2015 )
lcSqlSelect = [select * from mytable]
CURSORSETPROP( [FetchAsNeeded] , .T. , 0 )
IF liRecords > 0
CURSORSETPROP( [FetchSize] , 200 , 0 )
ENDIF
DO WHILE ! USED( lcCursor ) AND liStatus >= 0
liStatus = SQLEXEC( giConnectIDAsync, lcSqlSelect , lcCursor )
ENDDO
CURSORSETPROP( [FetchAsNeeded] , .F. , 0 )
>Thomas,
>
>I tried the following:
>
>
>oGrade = NEWOBJECT( 'myCAClass', 'myclasslib' )
>oGrade.FetchSize = 50
>oGrade.DataSource = gnDatasoure
>oGrade.CursorFill()
>
>
>it returned the whole 70,000 rows!
>
>What did I do wrong?
>
>Thanks again.
>Dennis
Best Regards
-Tom
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.
Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011