Hello All,
I'm trying to add my own DataEnvironment Class to a form at runtime, and receive the message "Object Class is invalid for this Container", the code in the Forms Load event looks like this
With this
.DataEnvironment.CloseTables()
.RemoveObject('DataEnvironment')
Set proc to \pete\prgs\pkdecls.prg additive
.AddObject('DataEnvironment','pkdebase') && This is were it fails
endwith
am I not allowed to do this?
my class definition looks like this
define class PKDEBase as DataEnvironment
AutoOpenTables = .t.
enddefine
Any help appreciated
Pete Kane
Regards,
Peter J. Kane
Pete