For Programmers: Free Programming Magazines  


Home > Archive > Clarion > July 2005 > Referencing a referenced file's fields









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Referencing a referenced file's fields
Gerhard Nel

2005-07-24, 8:18 pm

I have a file and a few variables:

Generic FILE,driver('ODBC'),name(mTableName),pre
(Gen)
RECORD RECORD
Field1 CSTRING(255)
Field2 CSTRING(255)
END
END

GenClass CLASS
FileRef &FILE
Get_Values procedure()
END



If I want to use the file variables like this it works fine.

Generic:Field1 = 'field1 value'
Generic:Field2 = 'field2 value'


But if i create a reference and i try the following it gives compiling
errors with the message "Field not found"


ClassObj CLASS(GenClass)
END

ClassObj.FileRef:Field1 = 'field1 value'
ClassObj.FileRef:Field2 = 'field2 value'

Nor does this work with dot notation (I figure it's because of the file
prefix):
ClassObj.FileRef.Field1 = 'field1 value'
ClassObj.FileRef.Field2 = 'field2 value'


Is it possible to do it like this, and if, what am I doing wrong?

Thanks for saving me alot of trouble
Gerhard Nel

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com