Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing cursoradapter after changing 'order by' claus
Message
 
À
17/09/2003 05:14:37
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00829310
Message ID:
00829778
Vues:
24
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform