Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding Meta Data of a RecordSet
Message
From
11/04/2000 09:31:54
 
 
To
11/04/2000 02:19:55
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00357837
Message ID:
00357936
Views:
13
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform