Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to navigate records in remote view
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00648981
Message ID:
00649008
Views:
17
Hi!

Take a look to the Fetch As Needed option for remote views. It allows to download first 100 records and then wait till user attempt to go further. As user scrolls through records, they're downloaded from the server (fetched). When go to bottom, all records are downloaded. All this wors automatically.

There is anotehr approach, but requires more programming - make another view that will download all possible ID values from the server. Then navigate this view and requery your first view with parameter for each record to query the rest of fields for each record and display on the form.

Finally, for users it is much better to use some sort of search form where user types criteria, gets results, then go to another page f the form to edit the record they're interested in or just to add a new record. In my applications I use usually this approach and it allow me easy limit number of records downloaded from server at once to 1000 records - let users narrow down the search criterie instead of spending time for browsing thousands of records. This also cause better effectiveness of user's work - by natural work of the form.

Hope this Helps.

>(Revised):
>I have a SQL table which contains 10 thousand records.
>It is not possible to fetch all records to navigate
>the records, such as using the toolbar: (top) (back)
>(next) (end), because there are too many records,
>I use filter condition to create a remote SQL view:
>
>CREATE SQL VIEW item2 REMOTE CONNECTION connect1 ;
> AS SELECT top 10 * FROM item WHERE itemid >= ?_id ;
> ORDER BY itemid
>
>In this case, if I want to find a item, I need only to change
>the variable value of "_id" and then requery() the view in my
>application. After modify, use tableupdate(.T.) to save the
>changes. It is so convenient in coding.
>But when I want to go (back) or (end), I found I can't move
>to the right record pointer because I don't know the exactly
>value of "itemid",
>How can I navigate to the right records? Is there any
>other approach method to do with navigation toolbar?
>Thank for any help.
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