Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
and I'll use the AFIELDS command to obtain an array of fields in the table.
m.lnx = AFIELDS(m.laFieldArray,'customer')
FOR lni = 1 TO m.lnx
m.lcCaption = DBGETPROP(
"customer." + m.laFieldArray[1,m.lni],
"Field",
"Caption")
m.BuildArray[1,lni] = m.laFieldArray[1,m.lni]
m.BuildArray[2,lni] = m.lcCaption[2,m.lni]
ENDFOR
then I end up with the 2 'parallel arrays' I was looking for....
thanks for 'breaking the back' of this problem...
>Dave
>
>Try DBGETPROP("customer.cust_id", "Field", "Caption")
>
>
>>>using
>>>
>>>SELECT Customer
>>>SCATTER TO m.laMyArray
>>>
>>>I obtain an array containing all fields of the customer table.
>>>
>>>Can I construct an array parallel to this one containing the caption property of each field?
>>>
>>>I must be able to do this inside a .prg file I cannot have this code working inside a Form or a Form's DataEnvironment.
>>
>>The only `technique` I can think of is opening the database container as a table ;
>>and doing
>>
>>USE C:\TEMP\CustomerDAtabase.dbc IN 0 ALIAS CustomerDatabase
>>
>>SELECT objectname , property
>>FROM CustomerDatabase
>>INTO CURSOR TestWork
>>WHERE ParentID = 51
>>
>>then i could scan through this cursor and parse through the property memo field to obtain the Caption information... but this method sucks :)
>>
>>anyone have any better suggestions?
Previous
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