Mark,
How do you populate your grid? Do you not instantiate the grid until the results are returned (different pages on a page frame?)? I've been working on a class that uses spt, but I'm having trouble with the grid.
Thanks
John
>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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only