Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Column data type

Status
Not open for further replies.

pelagic

Programmer
Nov 7, 2002
97
US
Hi there,
Hi there,

I have the following tableA with data
Column1 Column2 Column3
99 You Me
100 Me You

How do I get the column data type in tableA using VB
In this case
Column1 is integer
Column2 and 3 are string

Is there a function that display Column data type?

Thank you
 
What database are you using?

If it's SQL Server, then you can run this query:
Select * From Information_Schema.Columns Where Table_Name='[!]MyTableName[/!]'



-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Hi Gmmastros,

I am using MS Access database.

thanks,
pelagic
 
I assume you are using ADO to connect to the access database. You could try...

msgbox TypeName(Rs.Fields.Item("[!]ColumnName[/!]").Value)


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top