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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top