Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why can't DBGETPROP give me the datatype of a field?
Message
De
02/12/1998 12:41:11
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00163275
Message ID:
00163280
Vues:
24
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
Fil
Voir

Click here to load this message in the networking platform