>>What is a good way of letting the user enter a few (4-7) view parameters and then requerying the view to those parameters?
>Tony, instead of using a view (where the definition is stored in the DBC) why don't you just use a SQL-Select statement to populate your grid. Then you can modify the parameters with no problem. Just re-run the SELECT statement with the new clauses.
>
>If you are looking for a subset of your view, then you can use the view as the data source of your modified SELECT. This will cut the running time substantially.
>
>HTH
>Barbara
Thank you, that will work for me. For some reason I was under the impression that you couldn't index the output from a select statement like you can a view. But I was wrong, I just tried it using the "into cursor" option, and it worked fine! The only thing I did notice is that when you are only SELECTing one table, it does not create a temp dbf, but rather USEes AGAIN the base table, making it impossible to index. However, since I don't have this problem (my view involves several tables) then I'll worry about that later.
I was able to find out why I got the "view definition has changed" error. It seems my select statement had a calculated numeric result that needed room for a full int, but was not being created in the view as a full int, but rather something like a numeric 7 precision. It looks like fox has to make a best guess when the result is a calculation, not a field which has a set data type! Unfortnately this guess was wrong, and when an int over 7 digits came through it blew up! I found that I didn't need the int, so I converted it to a string and padded it to a fixed length. I had previously PADR'd all my char calculated fields to a fixed length, but this numeric one got by me!
Thanks for the help!
tc
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