Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding wwSQL to Application Object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Adding wwSQL to Application Object
Divers
Thread ID:
00453654
Message ID:
00453654
Vues:
112
I think I have read recently that a SQL object is going to be added to the next version of MM, but I can't wait that long. < g >

I would like to use wwSQL from West Wind for SPT, but I am not sure how to incorporate it. I have subclassed it and added a Release method (RELEASE THIS). Should I add a property, oSQL, to my application class, then modify the AddChildren method:
DODEFAULT()

THIS.Add("oSQL", THIS.oMMFactory.GetClassName('SQL'))
If I read the docs correctly, and that's a big if, the application object will handle releasing the oSQL reference.

Also, most of my business objects are going to access the goApp.oSQL object, but I don't always want to instantiate goApp while testing the biz objects. Should I add an oSQL property to my base KBizObj class, and in the PostInitHook, do something like this:
IF VARTYPE( goApp ) = "O"
   THIS.oSQL = goApp.oSQL
ELSE
   THIS.oSQL = CREATEOBJECT("MySQL")   
ENDIF
Chris McCandless
Red Sky Software
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform