General information
Category:
The Mere Mortals Framework
Title:
Two views in different DBC's
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only