Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with CA - SelectCmd property is empty
Message
De
16/04/2003 16:03:32
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Problem with CA - SelectCmd property is empty
Divers
Thread ID:
00778588
Message ID:
00778588
Vues:
66
I have a CA BaseClass that in the CursorFill Method checks if it should use CursorSchema and NoDataOnLoad.
Those properties are .T., and .T. in a child class (crsCategories)

I put the main code in the Init Event of the class crsCategories (created a builder based on Mark's CABuilder class)
Code of the Init event:
local llReturn
DO CASE
 CASE NOT PEMSTATUS(This, '__VFPSetup', 5)
  THIS.AddProperty('__VFPSetup', 0)
 CASE THIS.__VFPSetup = 2
  THIS.__VFPSetup = 0
  RETURN 
ENDCASE 
llReturn = DODEFAULT() 
*** Select connection code: DO NOT REMOVE 
SET MULTILOCKS ON 
***<SelectCmd> 
TEXT TO This.SelectCmd NOSHOW
SELECT * FROM CATEGORIES  WHERE CategoryID = ?pCategoryID
ENDTEXT
***</SelectCmd> 

***<DeleteCmd> 
TEXT TO This.DeleteCmd NOSHOW
EXEC PA_DEL_CATEGORIES  ?crsCategories.CategoryID
ENDTEXT
***</DeleteCmd> 

***<InsertCmd> 
TEXT TO This.InsertCmd NOSHOW
EXEC PA_INS_CATEGORIES  ?crsCategories.CATEGORYNAME,  ?crsCategories.DESCRIPTION,  ?crsCategories.PICTURE
ENDTEXT
***</InsertCmd> 

***<UpdateCmd> 
TEXT TO This.UpdateCmd NOSHOW
EXEC PA_UPD_CATEGORIES  ?crsCategories.CATEGORYID,  ?crsCategories.CATEGORYNAME,  ?crsCategories.DESCRIPTION,  ?crsCategories.PICTURE
ENDTEXT
***</UpdateCmd> 


*** End of Setup code: DO NOT REMOVE 
IF THIS.__VFPSetup = 1 
 THIS.__VFPSetup = 2 
ENDIF
Return llReturn 
Problem:
When I run a Form with a CA crsCategories based in this class I get an error in the CursorFill method
Error N° 2139 - SelectCmd property is empty.

Question: Whats wrong ? I have the SelectCmd that's in the Init event.

When will event Init start ? and what is the order of all the events in a CA ?

Is there a workarround for this problem, I would like to keep the code in the Init event,
or where should I put the code of a CA class to work.

Thanks in Advance

Peter
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform