Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Implementing a Browse with SQL Pass Thru
Message
From
05/02/2002 06:19:53
 
 
To
05/02/2002 04:29:41
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00614848
Message ID:
00615313
Views:
36
This message has been marked as a message which has helped to the initial question of the thread.
Hi!

Well, I tried to experiment some more and found no sequense that will create a cursor with FetchAsNeeded option set to .T. After creatign SPT cusor you can use that option, but VFP downloads all records anyway. In command window, however, I did managed (by some way - I do not remember how!) to tart downloading of 12,000 records with returning to command window before result is returned completely. It is so strange for me, because before I tried to use Asynchronous connection and failed to get control to program until cursor is downloaded. So progress is possible with SPT in asynchronous mode??? Unfortunately, VFP crashed with very strange message that I see for the first time: "pushJmp/popJmp mismatch" and I lost all commands I did in the command window ;(( (It was VFP6). I did not seen this message before and did not found any documentation on it.

I will experiment with this more and let you know exact conditions when this is possible.

>I've been reading the docs and found in Microsoft Visual FoxPro 6.0 - Programmer's Guide - Chapter 22 (Optimizing Client/Server Performance) page 605:
>
>Using Progressive Fetching
>
>"When you query a remote data source, Visual FoxPro retrieves complete rows of data and builds a Visual FoxPro cursor. To speed retrieval of remote data, Visual FoxPro employs progressive fetching of view cursors and cursors created asynchronously with SQL pass-through. Rather than requiring you or your application to wait while an entire data set is retrieved, Visual FoxPro executes a query and fetches only a small subset of the result set rows into the local cursor. The size of this subset is 100 rows by default."
>
>"Note: Synchronous SQL pass-through statements don't employ progressive fetching. The entire result set requested by a SQLEXEC( ) statement is retrieved before control is returned to your application."
>
>"As Visual FoxPro retrieves additional rows of data, the local cursor contains increasingly more of the queried data. Since rows are retrieved at different times from the data source, the information in the rows isn't automatically current. If your connection is operating in asynchronous mode, Visual FoxPro returns control to you or your program as soon as it fetches the first subset of data. During idle time, Visual FoxPro performs a background fetch of the remaining rows in the queried data, one subset at a time, into the local cursor. This scenario allows you to use the already fetched data in the cursor without having to wait for the rest of the data."
>
>As I could understand, reading the above, I can use progressive fetching with SPT. Is that right? If so, how can it be implemented? Or there is a bug and it doesn't work at all?
>
>Thanks,
>
>Fernando
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform