Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server slower than VFP?
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00250319
Message ID:
00251519
Views:
14
>What I am tring to accomplish is a search/lookup function. The user inputs a last name, say 'SMITH', and if there is more than one match (and with this last name there are, of course), he must select from a list of further details such as SSN, account#, etc... I realize there are other methods in which to accomplish this task that don't require a large browse window, but this is the method our users are already familiar with, and I would rather not make the task more difficult after they 'upgrade'.
>

You don't want to pull all 12,000 names to do this type of search. What you want to do is create a search form that uses a parameterized view, this will only pull the records that you need.

Set up a form that has on the top half a text field for each of the items you want to search for... and and 'FIND' button. Then on the bottom set up a grid. Create a view that contains the fields you want to user to see... Name, STatus, SSN, etc. Set up a filter on the view with a paramamter for each item you want to user to be able to search for. Something like....

FOR LastName LIKE ?vp_lastname and
FirstName LIKE ?vp_firstname and
SSN LIKE ?vp_ssno

Then, in your find button code put something like....

vp_lastname = txtLastName.Value + '%'
vp_firstname = txtFirstName.Value + '%'
vp_ssno = txtSSNO.Value + '%'
requery( v_findperson )

* you may need to refrsh the grid.

This will only get the matches from the back end that the user requested. So, if he types SMITH it will get all the people with that last name. You will then see all the SMITH's in the file. But, not all 12,000 records come accross, only the 45 smiths.

Once you have the recordset on the client side, you can sort or search within that perhaps in a searchable grid.

You could even get more fancy and make the above code a method that is called from the interactivechange or keypress event in each text box, which would do the requery as keys were typed. Or, have a timer that fires every few seconds... But, I find users don't seem to have a problem pressing a find button.


>It's possible this application is not suitable for SQL Server, I'm just wondering what tricks are available that might allow us to use it.
>

The trick is ONLY pull accross the records you need.

>The server is a Pentium II 233 MMX, 64MEG with at least 200M free disk space.

BOb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform