If GetOldDbSchemaTable doesn't suite you then you should use DDL statements
(i.e. sp_columns stored procedure should do)
--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development
www.rthand.com
Blog:
http://cs.rthand.com/blogs/blog_with_righthand/
"Jen" <(E-Mail Removed)> wrote in message
news:OIQ$(E-Mail Removed)...
> I'm using OleDb. Would I use OleDbConnection.GetOldDbSchemaTable? I'm
> trying that but both smalldatetime and datetime data types seem to return
> 135.
>
> Can I not distinguish between the two data types when using OleDb?
>
>
> "Miha Markic" <miha at rthand com> wrote in message
> news:A8CBEE33-5A89-4DA0-BBA5-(E-Mail Removed)...
>> You should use SqlConnection.GetSchema method to retrieve these kind of
>> information.
>>
>> --
>> Miha Markic [MVP C#, INETA Country Leader for Slovenia]
>> RightHand .NET consulting & development www.rthand.com
>> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>>
>> "Jen" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Is there a way for C# ADO.NET code to determine whether a SQL Server
>>> column data type is smalldatetime vs. datetime? It looks like
>>> DataColumn.DataType makes no distinction, both return DateTime.
>>>
>>
>
>