Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with bizobj instantiating another bizobj MM612
Message
From
19/07/2002 10:52:31
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00680275
Message ID:
00680459
Views:
20
Alex,
Are you saying that it's looking in the wrong database when it tries to instantiate the Punch_BO?

If so, check the cDefaultDatabaseName property of Employee_BO's DataEnvironment. (Also, make sure to check the cDatabaseName property of the cursor object(s) it contains) Do they correspond to what's in Punch_BO's DE? If not, you'll want to re-create Employee_BO's DE.

>Hi,
>
>I'm having a problem in an app where one bizobj needs to instantiate a second bizobj for a lookup.
>
>The main bizobj is punch_bo and the lookup bizobj is employee_bo.
>
>punch_bo:postinithook:
>This.oEmployee_bo = createobj("employee_bo")
>return .t.
>
>When employee_bo is instantiated it becomes amnesic and "forgets" all about the current database so I'm prompted to select the table as if none were specified.
>
>The two bizobjs are not in a parent/child relationship.
>
>The database is in a remote drive (G:). This is established in the ini file I'm using and also in the metadbc.dbf table.
>
>I have traced the code in employee_bo.
>
>The problem takes place in the employee_de.opentables() method. Even though all the properties (database, alias, etc.) seem to be in order, once the line:
>This.oDataEnviroment.OpenTables() is executed, BOOM, I'm presented with a dialog box to select a table.
>
>What's going on here?
>
>Thanks for any ideas!!!
>
>Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform