Hi Evan,
>I would like my functions and procedures to have private datasessions. Three reasons:
>Can anyone point to towards some resources on how to do this? Any the cons to this idea?
If I'm not mistaken, thats what the Session object is for, just create an instance of one set to private, and set the datasession to that, walla, a new DS. Or even simpler, create an instance of a form class:
local lnDS
lnDS = set('datasession')
oSession = createobject('MySession')
set datasession to (oSession.DataSessionID)
set datasession to (lnDS)
release oSession
DEFINE CLASS MySession AS FORM
Name = Session1
DataSession = 2
ENDDEFINE
That should be the way to do, giving a PRG a datasession at design time just seems silly, IMO.