Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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?
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement