What are SQL Server data-types mapped to by default in ADO.NET?

685 Views Asked by At

I need a list of all the SQL types and their .NET equivalent.

3

There are 3 best solutions below

0
On BEST ANSWER

See this post, for SQL Server types.

For other data providers see this.

0
On
1
On

Here's a list for .NET 3.5 / ADO.NET / SqlClient provider:

http://msdn.microsoft.com/en-us/library/cc716729.aspx

In addition, when dealing with ADO.NET parameters, keep in mind that you can specify varchar(max) or nvarchar(max) by using -1 as the length.