Information générale
Catégorie:
Codage, syntaxe et commandes
Hi Joe.
>The documentation says that DBGETPROP can get the 'DataType' of a field in a view, but NOT the 'DataType' of a field in a table.
>
>I know the TYPE function will give me the raw type ('C', 'N', 'D', etc...), but I want the complete data type: 'C10', 'N7,2'
DBGETPROP doesn't return the data type for a field because no structural information about tables (other than a list of field names) is stored in the DBC.
You have two choices:
- If the table is open or can be opened, use AFIELDS to create an array of structural information for each field
- You can use DBCX (a public domain data dictionary extension manager) to keep meta data information for your tables. Without opening the table, you can use code like:
oMeta.DBCXGetProp('table.field', 'Field', 'Type')
to get the data type.
Doug
Précédent
Suivant
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