Click here to Skip to main content
15,905,607 members
Home / Discussions / C#
   

C#

 
Generalembedding HTML and trapping events.... Pin
LongRange.Shooter3-Mar-03 5:51
LongRange.Shooter3-Mar-03 5:51 
GeneralRe: embedding HTML and trapping events.... Pin
Michael Mac4-Mar-03 9:05
Michael Mac4-Mar-03 9:05 
GeneralThreads and multiple http connections Pin
PeterJensen3-Mar-03 5:05
PeterJensen3-Mar-03 5:05 
GeneralRe: Threads and multiple http connections Pin
leppie3-Mar-03 6:33
leppie3-Mar-03 6:33 
GeneralRe: Threads and multiple http connections Pin
PeterJensen3-Mar-03 7:26
PeterJensen3-Mar-03 7:26 
GeneralRe: Threads and multiple http connections Pin
grv5754-Mar-03 15:05
grv5754-Mar-03 15:05 
Generaltype conversion Pin
egon3-Mar-03 3:01
egon3-Mar-03 3:01 
GeneralRe: type conversion Pin
leppie3-Mar-03 6:56
leppie3-Mar-03 6:56 
I have done just a hashtable mapping for that, anyways here's the code:
public class TypeMapping 
{
   static Hashtable map;

   public static Hashtable Mapping 
   {
      get {return map;}
   }

   static TypeMapping()
   {
      map = new Hashtable();
      map.Add(SqlDbType.BigInt, typeof(Int64));
      map.Add(SqlDbType.Binary, typeof(byte[]));
      map.Add(SqlDbType.Bit, typeof(Boolean ));
      map.Add(SqlDbType.Char, typeof( String ));
      map.Add(SqlDbType.DateTime, typeof( DateTime ));
      map.Add(SqlDbType.Decimal, typeof( Decimal ));
      map.Add(SqlDbType.Float, typeof( Double ));
      map.Add(SqlDbType.Image, typeof( byte[]));
      map.Add(SqlDbType.Int, typeof( Int32 ));
      map.Add(SqlDbType.Money, typeof( Decimal)); 
      map.Add(SqlDbType.NChar, typeof( String ));
      map.Add(SqlDbType.NText, typeof( String ));
      map.Add(SqlDbType.NVarChar, typeof( String ));
      map.Add(SqlDbType.Real, typeof( Single )); //not sure
      map.Add(SqlDbType.SmallDateTime, typeof( DateTime ));
      map.Add(SqlDbType.SmallInt, typeof( Int16 ));
      map.Add(SqlDbType.SmallMoney, typeof( Decimal)); 
      map.Add(SqlDbType.Text, typeof( String ));
      map.Add(SqlDbType.Timestamp, typeof( DateTime ));
      map.Add(SqlDbType.TinyInt, typeof( Byte ));
      map.Add(SqlDbType.UniqueIdentifier, typeof( Guid ));
      map.Add(SqlDbType.VarBinary, typeof( byte[] ));
      map.Add(SqlDbType.VarChar, typeof( String ));
      map.Add(SqlDbType.Variant, typeof( Object  ));//not sure
   } 
}


I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
GeneralRe: type conversion Pin
egon3-Mar-03 8:00
egon3-Mar-03 8:00 
QuestionDraw a rectangle in a richtextbox? Pin
red2k3-Mar-03 2:25
red2k3-Mar-03 2:25 
AnswerRe: Draw a rectangle in a richtextbox? Pin
jtmtv183-Mar-03 6:39
jtmtv183-Mar-03 6:39 
Questionvoid* interop? Pin
Anonymous2-Mar-03 19:55
Anonymous2-Mar-03 19:55 
AnswerRe: void* interop? Pin
Jeff J2-Mar-03 21:16
Jeff J2-Mar-03 21:16 
GeneralRe: void* interop? Pin
Anonymous3-Mar-03 2:04
Anonymous3-Mar-03 2:04 
GeneralRe: void* interop? Pin
leppie3-Mar-03 7:06
leppie3-Mar-03 7:06 
GeneralRe: void* interop? Pin
Jeff J4-Mar-03 14:36
Jeff J4-Mar-03 14:36 
GeneralInterop - Marshaling nested structs Pin
Nathan Tran2-Mar-03 19:01
Nathan Tran2-Mar-03 19:01 
GeneralRe: Interop - Marshaling nested structs Pin
leppie3-Mar-03 7:38
leppie3-Mar-03 7:38 
GeneralRe: Interop - Marshaling nested structs Pin
Nathan Tran3-Mar-03 11:56
Nathan Tran3-Mar-03 11:56 
GeneralRe: Interop - Marshaling nested structs Pin
leppie4-Mar-03 7:03
leppie4-Mar-03 7:03 
GeneralHowto: image to byte array Pin
Smitha Nishant2-Mar-03 18:56
protectorSmitha Nishant2-Mar-03 18:56 
GeneralRe: Howto: image to byte array Pin
Jeff J2-Mar-03 21:26
Jeff J2-Mar-03 21:26 
GeneralRe: Howto: image to byte array Pin
Smitha Nishant2-Mar-03 22:10
protectorSmitha Nishant2-Mar-03 22:10 
General***capturing image from video*** Pin
henrykao2-Mar-03 18:37
henrykao2-Mar-03 18:37 
QuestionCan you use resources to embed a wav? Pin
jtmtv182-Mar-03 13:48
jtmtv182-Mar-03 13:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.