How can I convert the SQL data types to csharp system types..

  • Thread starter Thread starter Champika Nirosh
  • Start date Start date
C

Champika Nirosh

Hi,

I want to convert ms sql data types to c# system types..

as an example

bit >>> System.Boolean
money >>> System.decimal

etc

Thanks,
Nirosh.
 
Hi,

Take a look at System.Data.SqlTypes under MSDN library. There is a list of
SQL server types and their corresponding SqlTypes. Then the list of SqlTypes
have member definitions which will show you how to extract the .NET typed
value from the Sql type.

HTH,
Chris.
 
Back
Top