Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing cursoradapter after changing 'order by' claus
Message
 
To
17/09/2003 05:14:37
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00829310
Message ID:
00829778
Views:
20
Hi Agnes,

This method works only in conjunction with Native VFP databases. It cannot be used with ADO/ODBC data sources.

Steve

>Hi Jozef,
>
>
>>Solution with using makro works only in conjunction with cursorfill method.
>
>????
>
>It works with cursorrefresh. I have done it.
>
>look at my Example
>
>LOCAL;
> lcMacro   AS CHARACTER,;
> loAdapter AS CURSORADAPTER
>
>
>CREATE CURSOR myTable (c1 C(1), c2 C(3))
>INSERT INTO myTable VALUES ("A","1")
>INSERT INTO myTable VALUES ("B","2")
>INSERT INTO myTable VALUES ("C","3")
>
>loAdapter = NEWOBJECT('captest')
>
>lcMacro = ''
>loAdapter.CURSORFILL()
>SELECT (loAdapter.ALIAS)
>BROWSE
>lcMacro = 'ORDER BY 1 DESC'
>loAdapter.CURSORREFRESH()
>BROWSE
>
>DEFINE CLASS capTest AS CURSORADAPTER
> PROCEDURE INIT
>  THIS.ALIAS          = 'capTest'
>  THIS.DATASOURCE     = 'Native'
>  THIS.DATASOURCETYPE = 'Native'
>  THIS.SELECTCMD      = "SELECT * FROM MyTable &lcMacro"
> ENDPROC &&INIT
>ENDDEFINE
>
>all what you have to care is, that SELCTCMD holds the &lcMacro, not the expanded string.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform