Thanks Gary. This is what I was looking for.
<i><font color="#663300">Bhavbhuti, Even though you've already got a solution, have you tried modifying the DataEnv code to do it? Here is something to try:
DEFINE CLASS my_data_env AS appenvironment FUNCTION INIT *-- Build the view or cursor here SELECT 0 SELECT ... INTO CURSOR myfreecur
DODEFAULT() && This will call LoadCursors
THIS.aftertablesopen()
ENDFUNC
FUNCTION loadcursors DIMENSION THIS.acursors[3] THIS.acursors[1] = 'DBCView1' THIS.acursors[2] = 'DBCView2' THIS.acursors[3] = 'MyFreeCur'
FUNCTION aftertablesopen SELECT myfreecur *-- Create additional indices, set relation into loaded VIEWS, etc. IF needed
ENDFUNC && AfterTablesOpen
ENDDEFINE
DEFINE CLASS myfreecur AS ctablecursor ORDER = "primary" CURSORSOURCE = "MyFreeCur" NAME = "MyFreeCur" ENDDEFINE
Gary Foster </font></i>
Regards Bhavbhuti ©2002 Bhavbhuti Nathwani |