Hi --
I have a TableSchema object in my C# code which is pointing to a table in sqlserver 2005.
I can access the Columns Property of the schema object, and get the name of the column, but now I want to get the data type of the object. (drilled down to the point so that if I get a varchar, i can know that it is a varchar (250) vs varchar(35)....
I am using the SourceTable. Column.DataType, but that is giving me C# datatypes, and I would like to have the SqlServer datatypes.
Okay, an update is that SourceTable.Columns[i].NativeType gives me the native type. Now I just need to find the drilled down part, where I can know what the lenth is of the datatype where that is applicable.
Thank you.
if (i != SourceTable.Columns.Count - 1)
{
strOutput += @"@" + SourceTable.Columns[i].Name + " ";
strOutput += SourceTable.Columns[i].DataType + "(";