Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding Meta Data of a RecordSet
Message
De
11/04/2000 09:31:54
 
 
À
11/04/2000 02:19:55
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00357837
Message ID:
00357936
Vues:
16
>Can any one tell me how to get the meta data of recordset in
>Visual Basic.
>
>Say a Record Set contain Three Columns
>====================================
>Column Data Length Decimals
>Name Type
>====================================
>NAME String 40
>AGE Integer 2 0
>SALARY Money 12 2
>====================================
>
>HOW TO GET THESE DETAILS (COLUMN_NAME,
>DATA_TYPE, LENGTH, DECIMALS) OF THE COLUMNS
>IN A RECORDSET ?

In addition to what Eric said, you can also check this data by looping through the fields collection and accessing various properties of the field object:
For Each oFld In rs.Fields
  Debug.Print oFld.Name
  Debug.Print oFld.Type
  Debug.Print oFld.DefinedSize
  Debug.Print oFld.Precision
Next
In the above example, the assupmtion is that rs is an open ADO recordset. You will have to look up the integer values on ADO's defined constants.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform