How to find out what the column's data type is?

  • Thread starter Thread starter Jon S via DotNetMonster.com
  • Start date Start date
J

Jon S via DotNetMonster.com

Hi all,

How would I find out what the data type is for the below column? I'm using
ADO.NET, C# and MS Access 2000.

col_Source.ColumnName

Thank you.
 
Hi Cor

Correct me if I'm wrong but I think this link is showing you how to SET a
column's data type. I have a DB table that already exists. I just want to
find out what the column's data type is when I loop through each column in
the table.

Thank you.
 
Jon,

did you try this code
\\\
Dim dt As New DataTable
dt.Columns.Add("Jon", GetType(System.SByte))
MessageBox.Show(dt.Columns(0).DataType.ToString)
///

I hope this helps,

Cor
 
Back
Top