I have found messages in the newsgroups that indicate a datastore should
be used, but I have not found any that indicate whether or not this can
be done.
I understand that using datastores is the preferred approach, but
unfortunately, we are in one of those legacy quandaries that prevent us
from doing things as we would like.
If anyone can tell us how, if at all we can create the DW, it would be
appreciated.
Thanks,
Aubrey
"Aubrey C. Eichel" <Aubrey...@noSXCspam.com> wrote in message
news:41c72b5b$1@forums-2-dub...
Such is life. As we don't want to redesign the NVO, I guess we will
have to figure out a method of having the calling objects create the DW
and pass it.
Thanks again for your help Scott,
Aubrey
a button calls the function wf_retrieve
for a datawindow and then a datastore:
wf_retrieve(dw_1)
messagebox('datawindow',string(dw_1.rowcount()))
datastore ls
ls = create datastore
ls.dataobject = 'd_header2'
wf_retrieve(ls)
messagebox('datastore',string(ls.rowcount()))
The function wf_retrieve passes the object
by reference then determines what it is and
retrieves it:
public function integer wf_retrieve (ref powerobject
aobject);
datawindow ldw
datastore lds
choose case aobject.typeof()
case datawindow!
ldw = aobject
ldw.settransobject(sqlca)
ldw.retrieve()
case datastore!
lds = aobject
lds.settransobject(sqlca)
lds.retrieve()
end choose
return 0
Although your example works great, it would mean changes to the function
that we are trying to avoid changing.
Appreciate your help though Dawn,
Aubrey
e.g. the window could have a function of_createDW(string dataobject)
that returns a datawindow (or powerobject)
// openuserobject + hide on window
// set dataobject
Return dw
on the nonvisual declare instance var:
datawindow idw_data
get a reference to that window and call the function
idw_data = lw_parent.of_createDW("d_data")
HTH,
Ben
In article <41c72b5b$1@forums-2-dub>, Aubrey...@noSXCspam.com
says...