|
3 | 3 |
|
4 | 4 | namespace System.Data |
5 | 5 | { |
6 | | - // Specifies the SQL Server data type. |
| 6 | + /// <summary> |
| 7 | + /// Specifies SQL Server-specific data type of a field, property, for use in a <see cref="T:Microsoft.Data.SqlClient.SqlParameter" />. |
| 8 | + /// </summary> |
7 | 9 | public enum SqlDbType |
8 | 10 | { |
9 | | - // A 64-bit signed integer. |
| 11 | + /// <summary> |
| 12 | + /// <see cref="long" />. A 64-bit signed integer. |
| 13 | + /// </summary> |
10 | 14 | BigInt = 0, |
| 15 | + |
| 16 | + /// <summary> |
| 17 | + /// <see cref="Array"/> of type <see cref="byte"/>. A fixed-length stream of binary data ranging between 1 and 8,000 bytes. |
| 18 | + /// </summary> |
11 | 19 | Binary = 1, |
| 20 | + |
| 21 | + /// <summary> |
| 22 | + /// <see cref="bool"/>. An unsigned numeric value that can be 0, 1, or <see langword="null"/> |
| 23 | + /// </summary> |
12 | 24 | Bit = 2, |
| 25 | + |
| 26 | + /// <summary> |
| 27 | + /// <see cref="string"/>. A fixed-length stream of non-Unicode characters ranging between 1 and 8,000 characters. |
| 28 | + /// </summary> |
13 | 29 | Char = 3, |
| 30 | + |
| 31 | + /// <summary> |
| 32 | + /// <see cref="System.DateTime"/>. Date and time data ranging in value from January 1, 1753 to December 31, 9999 to an accuracy of 3.33 milliseconds |
| 33 | + /// </summary> |
14 | 34 | DateTime = 4, |
| 35 | + |
| 36 | + /// <summary> |
| 37 | + /// <see cref="decimal"/>. A fixed precision and scale numeric value between -10 <sup>38</sup> -1 and 10 <sup>38</sup> -1. |
| 38 | + /// </summary> |
15 | 39 | Decimal = 5, |
| 40 | + |
| 41 | + /// <summary> |
| 42 | + /// <see cref="double"/>. A floating point number within the range of -1.79E +308 through 1.79E +308. |
| 43 | + /// </summary> |
16 | 44 | Float = 6, |
| 45 | + |
| 46 | + /// <summary> |
| 47 | + /// <see cref="Array"/> of type <see cref="byte"/>. A variable-length stream of binary data ranging from 0 to 2 <sup>31</sup> -1 |
| 48 | + /// (or 2,147,483,647) bytes. |
| 49 | + /// </summary> |
17 | 50 | Image = 7, |
| 51 | + |
| 52 | + /// <summary> |
| 53 | + /// <see cref="int"/>. A 32-bit signed integer. |
| 54 | + /// </summary> |
18 | 55 | Int = 8, |
| 56 | + |
| 57 | + /// <summary> |
| 58 | + /// <see cref="decimal"/>. A currency value ranging from -2 <sup>63</sup> (or -9,223,372,036,854,775,808) to 2 <sup>63</sup> |
| 59 | + /// -1 (or +9,223,372,036,854,775,807) with an accuracy to a ten-thousandth of a currency unit. |
| 60 | + /// </summary> |
19 | 61 | Money = 9, |
| 62 | + |
| 63 | + /// <summary> |
| 64 | + /// <see cref="string"/>. A fixed-length stream of Unicode characters ranging between 1 and 4,000 characters. |
| 65 | + /// </summary> |
20 | 66 | NChar = 10, |
| 67 | + |
| 68 | + /// <summary> |
| 69 | + /// <see cref="string"/>. A variable-length stream of Unicode data with a maximum length of 2 <sup>30</sup> - 1 |
| 70 | + /// (or 1,073,741,823) characters. |
| 71 | + /// </summary> |
21 | 72 | NText = 11, |
| 73 | + |
| 74 | + /// <summary> |
| 75 | + /// <see cref="string"/>. A variable-length stream of Unicode characters ranging between 1 and 4,000 characters. Implicit |
| 76 | + /// conversion fails if the string is greater than 4,000 characters. Explicitly set the object when working with strings |
| 77 | + /// longer than 4,000 characters. Use <see cref="F:System.Data.SqlDbType.NVarChar"/> when the database column is |
| 78 | + /// <see langword="nvarchar(max)"/>. |
| 79 | + /// </summary> |
22 | 80 | NVarChar = 12, |
| 81 | + |
| 82 | + /// <summary> |
| 83 | + /// <see cref="float"/>. A floating point number within the range of -3.40E +38 through 3.40E +38. |
| 84 | + /// </summary> |
23 | 85 | Real = 13, |
| 86 | + |
| 87 | + /// <summary> |
| 88 | + /// <see cref="Guid"/>. A globally unique identifier (or GUID). |
| 89 | + /// </summary> |
24 | 90 | UniqueIdentifier = 14, |
| 91 | + |
| 92 | + /// <summary> |
| 93 | + /// <see cref="System.DateTime"/>. Date and time data ranging in value from January 1, 1900 to June 6, 2079 to an accuracy of one minute. |
| 94 | + /// </summary> |
25 | 95 | SmallDateTime = 15, |
| 96 | + |
| 97 | + /// <summary> |
| 98 | + /// <see cref="short"/>. A 16-bit signed integer. |
| 99 | + /// </summary> |
26 | 100 | SmallInt = 16, |
| 101 | + |
| 102 | + /// <summary> |
| 103 | + /// <see cref="decimal"/>. A currency value ranging from -214,748.3648 to +214,748.3647 with an accuracy to a ten-thousandth of a currency unit. |
| 104 | + /// </summary> |
27 | 105 | SmallMoney = 17, |
| 106 | + |
| 107 | + /// <summary> |
| 108 | + /// <see cref="string"/>. A variable-length stream of non-Unicode data with a maximum length of 2 <sup>31</sup> -1 (or 2,147,483,647) characters. |
| 109 | + /// </summary> |
28 | 110 | Text = 18, |
| 111 | + |
| 112 | + /// <summary> |
| 113 | + /// <see cref="System.Array"/> of type <see cref="byte"/>. Automatically generated binary numbers, which are guaranteed to be unique within a database. <see langword="timestamp"/> is used typically as a mechanism for version-stamping table rows. The storage size is 8 bytes. |
| 114 | + /// </summary> |
29 | 115 | Timestamp = 19, |
| 116 | + |
| 117 | + /// <summary> |
| 118 | + /// <see cref="byte"/>. An 8-bit unsigned integer. |
| 119 | + /// </summary> |
30 | 120 | TinyInt = 20, |
| 121 | + |
| 122 | + /// <summary> |
| 123 | + /// <see cref="System.Array"/> of type <see cref="byte"/>. A variable-length stream of binary data ranging between 1 and 8,000 bytes. |
| 124 | + /// Implicit conversion fails if the byte array is greater than 8,000 bytes. Explicitly set the object when working with byte arrays |
| 125 | + /// larger than 8,000 bytes. |
| 126 | + /// </summary> |
31 | 127 | VarBinary = 21, |
| 128 | + |
| 129 | + /// <summary> |
| 130 | + /// <see cref="string"/>. A variable-length stream of non-Unicode characters ranging between 1 and 8,000 characters. |
| 131 | + /// Use <see cref="F:System.Data.SqlDbType.VarChar"/> when the database column is <see langword="varchar(max)"/>. |
| 132 | + /// </summary> |
32 | 133 | VarChar = 22, |
| 134 | + |
| 135 | + /// <summary> |
| 136 | + /// <see cref="object"/>. A special data type that can contain numeric, string, binary, or date data as well as the SQL Server values Empty and Null, |
| 137 | + /// which is assumed if no other type is declared. |
| 138 | + /// </summary> |
33 | 139 | Variant = 23, |
| 140 | + |
| 141 | + /// <summary> |
| 142 | + /// An XML value. Obtain the XML as a string using the <see cref="M:Microsoft.Data.SqlClient.SqlDataReader.GetValue(System.Int32)"/> method or |
| 143 | + /// <see cref="P:System.Data.SqlTypes.SqlXml.Value"/> property, or as an <see cref="T:System.Xml.XmlReader"/> by calling the |
| 144 | + /// <see cref="M:System.Data.SqlTypes.SqlXml.CreateReader"/> method. |
| 145 | + /// </summary> |
34 | 146 | Xml = 25, |
| 147 | + |
| 148 | + /// <summary> |
| 149 | + /// A SQL Server user-defined type (UDT). |
| 150 | + /// </summary> |
35 | 151 | Udt = 29, |
| 152 | + |
| 153 | + /// <summary> |
| 154 | + /// A special data type for specifying structured data contained in table-valued parameters. |
| 155 | + /// </summary> |
36 | 156 | Structured = 30, |
| 157 | + |
| 158 | + /// <summary> |
| 159 | + /// Date data ranging in value from January 1,1 AD through December 31, 9999 AD. |
| 160 | + /// </summary> |
37 | 161 | Date = 31, |
| 162 | + |
| 163 | + /// <summary> |
| 164 | + /// Time data based on a 24-hour clock. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. |
| 165 | + /// Corresponds to a SQL Server <see langword="time"/> value. |
| 166 | + /// </summary> |
38 | 167 | Time = 32, |
| 168 | + |
| 169 | + /// <summary> |
| 170 | + /// Date and time data. Date value range is from January 1,1 AD through December 31, 9999 AD. |
| 171 | + /// Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. |
| 172 | + /// </summary> |
39 | 173 | DateTime2 = 33, |
| 174 | + |
| 175 | + /// <summary> |
| 176 | + /// Date and time data with time zone awareness. Date value range is from January 1,1 AD through December 31, 9999 AD. |
| 177 | + /// Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Time zone value range |
| 178 | + /// is -14:00 through +14:00. |
| 179 | + /// </summary> |
40 | 180 | DateTimeOffset = 34, |
| 181 | + |
| 182 | + /// <summary> |
| 183 | + /// A JSON value. |
| 184 | + /// </summary> |
| 185 | + Json = 35, |
41 | 186 | } |
42 | 187 | } |
0 commit comments