main logo
Subject: Re: Code based view and BO???
Author: Gary Foster
Posted: 2002/08/16 15:25:17
 
View Entire Thread
New Search


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

 
©2002 Gary Foster
<-- Prior Message New Search Next Message -->