finding column datatype

  • Thread starter Thread starter Vikramaditya Singh
  • Start date Start date
V

Vikramaditya Singh

in vb.net i want to find out database column type, wether it is string or
number . How can i do this

thanks
 
Hi,

Once you have the database loaded into a dataset this will work.
Dim dc As DataColumn

For Each dc In ds.Tables(0).Columns

Dim strOut As String

strOut = String.Format("{0} - {1}", dc.ColumnName, dc.DataType)

Debug.WriteLine(strOut)

Next

Ken
 
Back
Top