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