Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter and WHERE
Message
De
21/02/2008 13:29:57
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01294821
Message ID:
01294875
Vues:
32
Hi Patrick --

Yes, I initially started with code to build the WHERE clause in the BeforeCursorFill event. I noted that this code was NOT being executed as I thought it would be and placed the code into the CursorFill as:
LPARAMETERS luseCursorSchema, lNoData, nOptions, Source

LOCAL ;
	lc_where as String, ;
	lv_result as Variant

IF (( NOT EMPTY(THIS.c_where_clause) ))
	lc_where = " WHERE " + THIS.c_where_clause
ELSE
	lc_where = SPACE(0)
ENDIF

THIS.c_select_cmd = THIS.SelectCmd && Save our default Select Command

TEXT TO THIS.SelectCmd TEXTMERGE NOSHOW FLAGS 0 PRETEXT 1+2+4+8
	<<THIS.SelectCmd>> <<lc_where>>
ENDTEXT

lv_result = DODEFAULT(luseCursorSchema, lNoData, nOptions, Source)

THIS.SelectCmd = THIS.c_select_cmd && Return to our default Select Command


RETURN lv_result
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform