Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'Find' screen w/ remote view
Message
 
 
To
15/10/2001 11:03:59
John Deupree
Long Term Care Authority
Tulsa, Oklahoma, United States
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00568532
Message ID:
00568578
Views:
33
For the very reason that I do not want to manage parameterized views for every conceivable way a user wants to do a search on remote data, I use SPT for this.

I have a query form with textboxes for various [important] fields where the user indicates what fields they want to search and the values each field should match. I then create the SQL in a GenerateSQL form method which includes the retrieval of the PK. I then use SQLExec() to run the search and return the results to a cursor which populates a grid. The user then selects the record they want. At this point, I use the PK in a parameterized view to retrieve that record for editing.

On the query form, I display the generated SQL in an edit box and allow them to edit the WHERE clause only. [Only the Where clause is in the edit box I have plain text boxes before and after to display the rest of the SQL. I also have an option group where they can indicate whether to use the LIKE operator or look for exact matches. In my GenerateSQL method, I generate the string using LIKE first. Once the string is complete, I do a STRTRAN() on LIKE and replace with equal sign if that is what is indicated by the option group value.

>I am working on a generic 'Find' class using remote views. My present class (using VFP tables) calls a form class with textbox and grid. The user can click on a grid column to find by that criteria. For example, click on col 1 to find by name. Type in name in textbox. Click on OK to return results. Click on col 2 to find by SSN, etc.
>
>I have the same type of setup using remote parametized views. The only way I can figure out how to search for different criteria, is to use a view for each. That is, a view for name, one for SSN, one for city, etc. Is there a better way to do this (translation - using only 1 view)?
>
>TIA
>
>John
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform