Yes but this is the wrong forum for C# questions, this is the SQL forum :)
Please use the C# forum in the future but don't open a new thread for this question, it will be moved shortly!
To answer your question -- you don't want to do whatever you're attempting. The CLR and MSSQL driver handles the data conversion for. The SQL Data types are listed as an enumeration member. See System.Data.SqlDbType .
using System;
namespace System.Data
{
public enum SqlDbType
{
BigInt = 0,
Binary = 1,
Bit = 2,
Char = 3,
DateTime = 4,
Decimal = 5,
Float = 6,
Image = 7,
Int = 8,
Money = 9,
NChar = 10,
NText = 11,
NVarChar = 12,
Real = 13,
UniqueIdentifier = 14,
SmallDateTime = 15,
SmallInt = 16,
SmallMoney = 17,
Text = 18,
Timestamp = 19,
TinyInt = 20,
VarBinary = 21,
VarChar = 22,
Variant = 23,
Xml = 25,
Udt = 29,
Structured = 30,
Date = 31,
Time = 32,
DateTime2 = 33,
DateTimeOffset = 34,
}
}
If this is not what you are wanting to do then please clarify what you are trying to accomplish.