![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
select * from abc into cursor searchresult now the problem is "how to set sort order of searchresult cursor same as that of cursor1?". |
|
but i recieve "table has no index order set".(which i think is perhaps because searchresults does not have any index inherited of the table abc.) |
|
aoa consider this scenario: i have a table "abc" in my form's data environment. the table is given the name "cursor1" by vfp.i set "order" property of this cursor to "xyz" index. then i load the form.the effect is that records are displayed in order of xyz. i am also providing a search feature with a button named "find". when the user clicks find,i run a query of the form: select * from abc into cursor searchresult now the problem is "how to set sort order of searchresult cursor same as that of cursor1?". i tried this code but it didnt work: ord=ORDER()&&save current order i.e. cursor1's order SELECT *; FROM abc; into cursor searchresults SET ORDER TO (ord)&&set searchresults' order to same as that of cursor1 but i recieve "table has no index order set".(which i think is perhaps because searchresults does not have any index inherited of the table abc.) i hope somebody will reply. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
aoa thnx stefan.actually, i wanted to write a generic code which i could use in all of my forms. what i wanted was that the select statement get ordered same as the orignal cursor. |
|
but nevermind if it didnt work.i have used the sek() function.thanx again. |
![]() |
| Thread Tools | |
| Display Modes | |
| |