Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two views in different DBC's
Message
From
12/01/1999 12:09:49
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Two views in different DBC's
Miscellaneous
Thread ID:
00175108
Message ID:
00175108
Views:
57
Hi everyone,
I am using the CVTDENVS conversion program in MM 4.01 to convert my adataenv.prg. Everything worked fine, then I started adding the cursors to the environments with a temporary object and the builder like the manual says. I was doing ok until I got to some DE's that have views in different databases. In the original codebook 3.0 adataenv.prg the code looked like this:


DEFINE CLASS ProjEnvironment AS CDataEnvironment
cDefaultDatabaseName = 'MyProj'
ENDDEFINE

DEFINE CLASS OrdersEnvironment AS ProjEnvironment
cDefaultDatabaseName = 'Orders'
FUNCTION LoadCursors()
DIMENSION this.aCursors[2]
this.aCursors[1] = 'v_OrdAmt'
this.aCursors[2] = 'v_CustName'
ENDFUNC
ENDDEFINE

DEFINE CLASS v_OrdAmt AS CDynamicViewCursor
cCursorSource = 'v_OrdAmt'
ENDDEFINE

DEFINE CLASS v_CustName AS cDynamicViewCursor
cCursorSource = 'v_CustName'

FUNCTION INIT()
LOCAL llRetVal
llRetVal = CDynamicViewCursor::Init()
this.Database = STRTRAN(this.Database, 'ORDERS', 'CUSTOMERS')
RETURN llRetVal
ENDFUNC
ENDDEFINE

I think I got everything in that. The reason the developer used the STRTRAN() is because the views reside in seperate DBC's (v_CustName is in the Customers DBC, v_OrdAmt is in the Orders DBC).

I'm not sure if this was the correct way to do this, but it's been working fine. Anybody have any suggestions about how to duplicate this in the new Adataenv.vcx with the builder or manually, or is this a design issue?

Thanks for any help
Next
Reply
Map
View

Click here to load this message in the networking platform