As an alternative to being specific to SQL Server, you might want to
look at DbDataReader.GetSchemaTable(). It provides a mechanism to get
the schema of a SqlDataReader (which might be a good way of getting this
data). No way that I know of to get this from a
DataAdapter/DataSet/DataTable, but does work across managed providers.
Thanks,
Shawn Wildermuth
Wildermuth Consulting Services, LLC
http://adoguy.com
C# MVP, MCSD.NET, Author and Speaker
> -----Original Message-----
> From: Jared [mailto:google@tripletreesoftware.com]
> Posted At: Thursday, July 13, 2006 6:35 PM
> Posted To: microsoft.public.dotnet.framework.adonet
> Conversation: Determining field type CHAR vs VARCHAR
> Subject: Re: Determining field type CHAR vs VARCHAR
>
>
> Hi Marina,
>
> I was hoping this would be exposed in DataColumn, but
> querying the system tables should work, too. Thanks for your
> quick response!
>
> Jared
>
> Marina Levit [MVP] wrote:
> > You can query the sql server system tables to find out. Try
> looking at
> > syscolumns.
> >
>
>
>