I have a generic business object that cannot have a default database name for its dataenvironment.
The Init process of cDataEnvironment assumes that the bizobj has something in its cDefaultDatabaseName property. The SEEK in dbpaths finds the first record because ''matches everything.
GetDefaultDatabase doesn't work because the bizobjform is already operating in its private data session. And when it returns FULLPATH('') it actually returns SET('DEFAULT') + CURDIR() + '' which then fails the IsValidDefaultDatabase() test.
My first thought is to change iDataEnvironment.GetDefaultDatabase() to check Datasession1 if there is no database in the current datasession. I can't imagine why a dataenvironment would be instantiated after the init of a form. Bizobjs and their dataenvironments need to be instantiated before any controls that would have control sources, but my instincts tell me I shouldn't switch datasessions and there must be a better way. Can someone think of one? :-) Pamela pamela At eagle-crest D.O.T com ©2000 Pamela Thalacker |