Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best Practices in Fetching Recs for a C/S DataEntry Form
Message
From
26/07/2010 01:49:48
 
 
To
23/07/2010 20:46:43
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MySQL
Miscellaneous
Thread ID:
01473556
Message ID:
01473871
Views:
107
Hi Dennis,

I can't tell you anything about CAs 'cause we haven't switched our apps to that approach. However as Craig and Victor wrote, we use either parameterized RVs or SQLs with several WHERE clauses to reduze the amount of data that has to be retrieved. However, there always exists the posibility that a user really wants all the records or a bunch of several thousands and thats where FetchAsNeeded and FetchSize come into play. But as I already wrote...those routines were written a long time ago and haven't yet transformed to CA use.


>Thomas,
>
>
>	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 )
>
>
>In your code, you used SQLEXEC(). Does this mean CursorFill() does not work hand in hand with the Fetch* properties?
>
>Thanks
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform