.Net

Sql corresponds to the Asp.Net data type

Sql corresponds to the Asp.Net data type, someone asked me to explain?

Sql corresponds to the Asp.Net data type

During the development of the program, when creating SQL stored procedure parameters, you need to find the corresponding SQL data type according to the defined ASP.NET data type; if you are not familiar with the "Sql and Asp.Net data type", you will need it. Their correspondence tables are listed in detail below.

  Related note: BigInt is supported by the .NET Compact Framework; Int64 is a 64-bit signed integer; Binary is supported by the .NET Compact Framework; Array is a fixed-length stream of Byte binary data, ranging from 1 to 8,000 words Between sections; Bit is supported by the .NET Compact Framework.

  • SQL
  • ASP.Net
  • SmallInt

    Supported by the .NET Compact Framework.

  • Int16

    A 16-bit signed integer.

  • Int

    Supported by the .NET Compact Framework.

  • Int32

    A 32-bit signed integer.

  • Float

    Supported by the .NET Compact Framework.
     

  • Double

    -1.79E +308 to floating point numbers in the range 1.79E +308.

  • SmallMoney

    Supported by the .NET Compact Framework.

     

  • Decimal

    A currency value ranging from -214,748.3648 to +214,748.3647 with an accuracy of ten thousandths of a unit of currency.

  • Money

    Supported by the .NET Compact Framework.


     

  • Decimal

    A currency value ranging from -263 (ie -922,337,203,685,477.5808) to 2 63 -1 (ie +922,337,203,685,477.5807) with an accuracy of ten thousandths of a unit of currency.

  • BigInt

    Supported by the .NET Compact Framework.

  • Int64

    A 64-bit signed integer.

  • Binary

    Supported by the .NET Compact Framework.
     

  • Array type is Byte

    A fixed-length stream of binary data ranging from 1 to 8,000 bytes.

  • Bit

    Supported by the .NET Compact Framework.
     

  • Boolean

    An unsigned value that can be 0, 1, or a null reference (Nothing in Visual Basic).

  • Char

    Supported by the .NET Compact Framework.
     

  • String

    A fixed-length stream of non-Unicode characters ranging from 1 to 8,000 characters.

  • DateTime

    Supported by the .NET Compact Framework.
     

  • DateTime

    Date and time data, with values ​​ranging from January 1, 1753 to December 31, 9999, with an accuracy of 3.33 milliseconds.

  • Decimal

    Supported by the .NET Compact Framework.
     

  • Decimal

    Fixed precision and scale values ​​between -1038 -1 and 10 38 -1.

  • Image

    Supported by the .NET Compact Framework.
     

  • Array type is Byte

    A variable-length stream of binary data ranging from 0 to 231 -1 (or 2,147,483,647) bytes.

  • NChar

    Supported by the .NET Compact Framework.
     

  • String

    A fixed-length stream of Unicode characters ranging from 1 to 4,000 characters.

  • NText

    Supported by the .NET Compact Framework.
     

  • String

    A variable-length stream of Unicode data with a maximum length of 230 - 1 (or 1,073,741,823) characters.

  • NVarChar

    Supported by the .NET Compact Framework.



     

  • String

    A variable-length stream of Unicode characters ranging from 1 to 4,000 characters.

    Note: If the string is greater than 4,000 characters, the implicit conversion will fail. When using a string longer than 4,000 characters, explicitly set the object.
  • Real

    Supported by the .NET Compact Framework.

  • Single

    -3.40E +38 to 3.40E +38 floating point number.

  • SmallDateTime

    Supported by the .NET Compact Framework.
     

  • DateTime

    Date and time data, with values ​​ranging from January 1, 1900 to June 6, 2079, with an accuracy of 1 minute.

  • Text

    Supported by the .NET Compact Framework.
     

  • String

    A variable-length stream of non-Unicode data with a maximum length of 231 -1 (or 2,147,483,647) characters.

  • Timestamp

    Supported by the .NET Compact Framework.

     

  • Array type is Byte

    Automatically generated binary numbers and guaranteed to be unique in the database. Timestamp is often used as a mechanism to mark the version of each row in a table. The storage size is 8 bytes.

  • TinyInt

    Supported by the .NET Compact Framework.

  • Byte

    8-bit unsigned integer.

  • UniqueIdentifier

    Supported by the .NET Compact Framework.

  • Guid

    Globally unique identifier (or GUID).

  • VarBinary

    Supported by the .NET Compact Framework.



     

  • Array type is Byte

    A variable-length stream of binary data ranging from 1 to 8,000 bytes.

    Note: If the byte array is larger than 8,000 bytes, the implicit conversion will fail. When using a byte array larger than 8,000 bytes, explicitly set the object.
  • VarChar

    Supported by the .NET Compact Framework.
     

  • String

    A variable-length stream of non-Unicode characters ranging from 1 to 8,000 characters.

  • Variant

    Supported by the .NET Compact Framework.


     

  • Object

    Special data types, which can contain numeric, string, binary, or date data, as well as SQL Server values ​​Empty and Null, the latter two values ​​are used without declaring other types.

Post your comments / questions