PC Review


Reply
Thread Tools Rate Thread

How to convert a SqlDbType to plain Type

 
 
bborowin@gmail.com
Guest
Posts: n/a
 
      9th May 2007
Hi there,

Given a collection of SqlDbType enums (eg, {BigInt, VarChar, Bit}), I
need to convert it to a collection of corresponding C# Types (here,
{long, string, bool}).

The contents of the source collection is not known ahead of time; it
could be any valid combination of enums in the SqlDbType enumeration.

Short of writing an explicit switch statement for all elements in the
enumeration, is there a neat way to convert SqlDbType enums to Types?


thanks for your help,

b.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert DataColumn.GetType() into a DbType or SqlDbType? Chris Bordeman Microsoft C# .NET 4 18th Nov 2006 04:48 AM
convert DataColumn.GetType() into a DbType or SqlDbType? Chris Bordeman Microsoft Dot NET Framework 4 18th Nov 2006 04:48 AM
How do I convert a FileInfo.Attributes to a SqlDBType =?Utf-8?B?R3JlZyBMYXJzZW4=?= Microsoft C# .NET 2 1st Jun 2006 02:32 PM
How to convert/cast sqldbtype.int =?Utf-8?B?QW1pbA==?= Microsoft C# .NET 3 28th Jul 2005 02:32 PM
Convert string to sqldbtype B.S. van Veen Microsoft ADO .NET 2 19th Oct 2004 07:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:15 AM.