2 // System.Data.Odbc.OdbcType
5 // Sureshkumar T <tsureshkumar@novell.com> 2005.
8 // Copyright (C) Brian Ritchie, 2002
12 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
14 // Permission is hereby granted, free of charge, to any person obtaining
15 // a copy of this software and associated documentation files (the
16 // "Software"), to deal in the Software without restriction, including
17 // without limitation the rights to use, copy, modify, merge, publish,
18 // distribute, sublicense, and/or sell copies of the Software, and to
19 // permit persons to whom the Software is furnished to do so, subject to
20 // the following conditions:
22 // The above copyright notice and this permission notice shall be
23 // included in all copies or substantial portions of the Software.
25 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 using System.Data.Common;
37 namespace System.Data.Odbc
63 UniqueIdentifier = 15,
68 // From the ODBC documentation:
70 // In ODBC 3.x, the identifiers for date, time, and timestamp SQL data types
71 // have changed from SQL_DATE, SQL_TIME, and SQL_TIMESTAMP (with instances of
72 // #define in the header file of 9, 10, and 11) to SQL_TYPE_DATE, SQL_TYPE_TIME,
73 // and SQL_TYPE_TIMESTAMP (with instances of #define in the header file of 91, 92, and 93),
76 // This internal enum is used as mapping types into database drivers.
77 // This is essentially a map between public OdbcType to C types for
78 // Odbc to call into driver. These values are taken from sql.h & sqlext.h.
79 internal enum SQL_TYPE : short
90 INTERVAL_DAY = (100 + 3),
91 INTERVAL_DAY_TO_HOUR = (100 + 8),
92 INTERVAL_DAY_TO_MINUTE = (100 + 9),
93 INTERVAL_DAY_TO_SECOND = (100 + 10),
94 INTERVAL_HOUR = (100 + 4),
95 INTERVAL_HOUR_TO_MINUTE = (100 + 11),
96 INTERVAL_HOUR_TO_SECOND = (100 + 12),
97 INTERVAL_MINUTE = (100 + 5),
98 INTERVAL_MINUTE_TO_SECOND = (100 + 13),
99 INTERVAL_MONTH = (100 + 2),
100 INTERVAL_SECOND = (100 + 6),
101 INTERVAL_YEAR = (100 + 1),
102 INTERVAL_YEAR_TO_MONTH = (100 + 7),
103 LONGVARBINARY = (-4),
117 WLONGVARCHAR = (-10),
119 UNASSIGNED = Int16.MaxValue
122 internal enum SQL_C_TYPE : short
126 BOOKMARK = (4 +(-22)),
133 INTERVAL_DAY = (100 + 3),
134 INTERVAL_DAY_TO_HOUR = (100 + 8),
135 INTERVAL_DAY_TO_MINUTE = (100 + 9),
136 INTERVAL_DAY_TO_SECOND = (100 + 10),
137 INTERVAL_HOUR = (100 + 4),
138 INTERVAL_HOUR_TO_MINUTE = (100 + 11),
139 INTERVAL_HOUR_TO_SECOND = (100 + 12),
140 INTERVAL_MINUTE = (100 + 5),
141 INTERVAL_MINUTE_TO_SECOND = (100 + 13),
142 INTERVAL_MONTH = (100 + 2),
143 INTERVAL_SECOND = (100 + 6),
144 INTERVAL_YEAR = (100 + 1),
145 INTERVAL_YEAR_TO_MONTH = (100 + 7),
148 SBIGINT = ((-5)+(-20)),
152 STINYINT = ((-6)+(-20)),
160 UBIGINT = ((-5)+(-22)),
163 UTINYINT = ((-6)+(-22)),
165 UNASSIGNED = Int16.MaxValue