I have two view definitions that I'm trying to load into the DE. Each definition is in a class that is instantiated in the DE.BeforeTableOpen method as uses THISFORM.AddObject(). The first view definition loads just fine and the .NoDataOnLoad property is .F. and the view populates just fine.
The second view definition is really 4 CREATE SQL VIEW commands and it is the last definition that I want in the DE. VFP defines the first view, but blows up at the definition for the second. The strange thing is that if I move this code out of the DE.BeforeOpenTable method and execute it somewhere else (I was hoping to just do Requery), it works just fine although I execute the code to add it to the DE, a grid, that is populated via this view, does not respond to the changing of the cursor's .Order property.
Any ideas as to why this code works outside of the DE but not within the DE. I'd like to have all the views defined with .NoDataOnLoad and simply execute Requery. I do build the grids, but do not set the .RecordSource until after the view populates.
Steve Despres
EZ Data Inc.
sdespres@erols.com