.NET Framework: Csharp(C#) Equivalents of SQL Server 2005 DataTypes | Coding Cluster - using asp.net, c#, mvc 4, iphone, php, ios, javascript, in asp.net mvc 3 & more

.NET Framework: Csharp(C#) Equivalents of SQL Server 2005 DataTypes


SQL Server Data Types and Their .NET Framework (c#) Equivalents:
                    The following table lists Microsoft SQL Server data types, their equivalents in the common language runtime (CLR) for SQL Server in the System.Data.SqlTypes namespace, and their native CLR equivalents in the Microsoft .NET Framework.

SQL Server data type CLR data type (SQL Server) CLR data type (.NET Framework)
varbinary SqlBytes, SqlBinary Byte[]
binary SqlBytes, SqlBinary Byte[]
varbinary(1), binary(1) SqlBytes, SqlBinary byte, Byte[]
image NoneNone
varchar NoneNone
char NoneNone
nvarchar(1), nchar(1) SqlChars, SqlString Char, String, Char[]
nvarchar SqlChars, SqlString
SQLChars is a better match for
data transfer and access,
and SQLString is a better match for
performing String operations.
String, Char[]
nchar SqlChars, SqlString String, Char[]
text NoneNone
ntext NoneNone
uniqueidentifier SqlGuid Guid
rowversion NoneByte[]
bit SqlBoolean Boolean
tinyint SqlByte Byte
smallint SqlInt16 Int16
int SqlInt32 Int32
bigint SqlInt64 Int64
smallmoney SqlMoney Decimal
money SqlMoney Decimal
numeric SqlDecimal Decimal
decimal SqlDecimal Decimal
real SqlSingle Single
float SqlDouble Double
smalldatetime SqlDateTime DateTime
datetime SqlDateTime DateTime
sql_variant NoneObject
User-defined type(UDT) NoneSame class that is bound to the
user-defined type in the same assembly
or a dependent assembly.
table NoneNone
cursor NoneNone
timestamp NoneNone
xml SqlXml None
For more details please review this link http://msdn.microsoft.com/fr-fr/library/ms131092(v=sql.90).aspx


Atul said...

Thanks for all the information,it was very helpful and i really like that you are providing information on .net training ,being enrolled in .net freshers training with projects live training http://www.wiziq.com/course/57-fresher-training-projects i was looking for such .net fresher training to assist me and your information helped me a lot.Really like that you are providing such information . Than

Annie Calvert said...

The grid enables work with arrays of strings or any other objects.This method is applicable only to very simple applications.The grid doesn’t set any limitations of data types,however working with untyped data in a large application often causes a lot of errors,makes the code much more complicated and indicates improper application design.more detail you can read tutorial on dapfor. com

Sudhir DBAKings said...

Nice post very helpful


Post a Comment

Share your thoughts here...




Blogger Widgets