Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataEnvironment Class problem
Message
From
30/12/2002 09:21:40
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
DataEnvironment Class problem
Miscellaneous
Thread ID:
00736556
Message ID:
00736556
Views:
44
I have problem which I can't understand.
I have created DE Class for my database which hold two tables and relation between them.
The code is this:



#DEFINE databasepath "C:\mydirectory\"

DEFINE CLASS CUSTOMERS AS cursor
alias = "CUSTOMERS"
cursorsource = "CUSTOMER"
database = DATABASEPATH + "BUSINESS.DBC"
ENDDEFINE

DEFINE CLASS ORDERS AS cursor
alias = "ORDERS"
cursorsource = "ORDERS"
database = DATABASEPATH + "BUSINESS.DBC"
ENDDEFINE

DEFINE CLASS ORDERS_TO_CUSTOMERS AS relation
childalias = "CUSTOMERS"
parentalias = "ORDERS"
RelationalExpr = "CID_ORDER"
childorder = "CID_ORDER"
ENDDEFINE

DEFINE CLASS businessDE AS DataEnvironment
ADD OBJECT oCUSTOMERS AS CUSTOMERS
ADD OBJECT oORDERS AS ORDERS
ADD OBJECT oORDERS_TO_CUSTOMERS AS ORDERS_TO_CUSTOMERS

PROCEDURE Init()
this.OpenTables()
ENDPROC

PROCEDURE Destroy()
this.CloseTables()
ENDPROC
ENDDEFINE



When I try to create instance of this class:
oDE = CREATEOBJECT('businessDE')
it shows this: "Variable 'CID_ORDER' is not found.'.
and it shows (de)bug on this.OpenTables().

When I remove relation class (ORDERS_TO_CUSTOMERS) creation of instance is OK but there is no relation between table.

What is the problem? Can anybody help me?
Next
Reply
Map
View

Click here to load this message in the networking platform