G
Guest
Hi, I have the following problem:
I want to retrieve SQL data type of every column from database (means I want
to retrieve bigint, varchar(20) etc. instead of System.Int32, System.String
etc). I've written the following code:
string[] datatype = new string [100];
int i=0;
foreach (DataColumn column in myDataTable.Columns)
{
i++;
datatype = column.DataType.ToString();
}
but this code retrieves C# data types, i.e System.Int32, System.String and
so on.
Anyone can help me with some tips?
I want to retrieve SQL data type of every column from database (means I want
to retrieve bigint, varchar(20) etc. instead of System.Int32, System.String
etc). I've written the following code:
string[] datatype = new string [100];
int i=0;
foreach (DataColumn column in myDataTable.Columns)
{
i++;
datatype = column.DataType.ToString();
}
but this code retrieves C# data types, i.e System.Int32, System.String and
so on.
Anyone can help me with some tips?