>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.