3 // Permission is hereby granted, free of charge, to any person obtaining
4 // a copy of this software and associated documentation files (the
5 // "Software"), to deal in the Software without restriction, including
6 // without limitation the rights to use, copy, modify, merge, publish,
7 // distribute, sublicense, and/or sell copies of the Software, and to
8 // permit persons to whom the Software is furnished to do so, subject to
9 // the following conditions:
11 // The above copyright notice and this permission notice shall be
12 // included in all copies or substantial portions of the Software.
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 /// DB2DriverCS - A DB2 driver for .Net
24 /// Copyright 2003 By Christopher Bockner
25 /// Released under the terms of the MIT/X11 Licence
26 /// Please refer to the Licence.txt file that should be distributed with this package
27 /// This software requires that DB2 client software be installed correctly on the machine
28 /// (or instance) on which the driver is running.
35 /// Summary description for DB2Constants.
37 public class DB2ClientConstants
39 public DB2ClientConstants()
42 // TODO: Add constructor logic here
46 public const short SQL_HANDLE_ENV
= 1;
47 public const short SQL_HANDLE_DBC
= 2;
48 public const short SQL_HANDLE_STMT
= 3;
49 public const short SQL_HANDLE_DESC
= 4;
52 public const long SQL_SUCCESS
= 0;
53 public const long SQL_SUCCESS_WITH_INFO
= 1;
54 public const long SQL_NEED_DATA
= 99;
55 public const long SQL_NO_DATA
= 100;
56 public const long SQL_STILL_EXECUTING
= 2;
57 public const long SQL_ERROR
= -1;
58 public const long SQL_INVALID_HANDLE
= -2;
59 public const int SQL_NTS
= -3;
60 public const long SQL_NULL_HANDLE
= 0L;
61 public const short SQL_COMMIT
= 0;
62 public const short SQL_ROLLBACK
= 1;
63 public const short SQL_NO_DATA_FOUND
= 100;
65 /* Isolation levels */
66 public const long SQL_TXN_READ_UNCOMMITTED
= 0x00000001L
;
67 public const long SQL_TXN_READ_COMMITTED
= 0x00000002L
;
68 public const long SQL_TXN_REPEATABLE_READ
= 0x00000004L
;
69 public const long SQL_TXN_SERIALIZABLE_READ
= 0x00000008L
;
70 public const long SQL_TXN_NOCOMMIT
= 0x00000020L
;
73 public const long SQL_TXN_ISOLATION
= 108;
74 public const long SQL_AUTOCOMMIT
= 102;
76 public const long SQL_AUTOCOMMIT_OFF
= 0L;
77 public const long SQL_AUTOCOMMIT_ON
= 1L;
80 public const int SQL_UNKNOWN_TYPE
= 0;
81 public const int SQL_CHAR
= 1;
82 public const int SQL_NUMERIC
= 2;
83 public const int SQL_DECIMAL
= 3;
84 public const int SQL_INTEGER
= 4;
85 public const int SQL_SMALLINT
= 5;
86 public const int SQL_FLOAT
= 6;
87 public const int SQL_REAL
= 7;
88 public const int SQL_DOUBLE
= 8;
89 public const int SQL_DATETIME
= 9;
90 public const int SQL_VARCHAR
= 12;
91 public const int SQL_WCHAR
= (-8);
92 public const int SQL_WVARCHAR
= (-9);
93 public const int SQL_WLONGVARCHAR
= (-10);
94 public const int SQL_TYPE_DATE
= 91;
95 public const int SQL_TYPE_TIME
= 92;
96 public const int SQL_TYPE_TIMESTAMP
= 93;
98 public const int SQL_C_CHAR
= SQL_CHAR
;
99 public const int SQL_C_DEFAULT
= 99;
101 public const int SQL_BLOB_LOCATOR
= 31;
102 public const int SQL_CLOB_LOCATOR
= 41;
103 public const int SQL_DBCLOB_LOCATOR
= -351;
105 public const int SQL_C_BLOB_LOCATOR
= SQL_BLOB_LOCATOR
;
106 public const int SQL_C_CLOB_LOCATOR
= SQL_CLOB_LOCATOR
;
107 public const int SQL_C_DBCLOB_LOCATOR
= SQL_DBCLOB_LOCATOR
;
109 public const int SQL_USER_DEFINED_TYPE
= (-450);
111 /* SQLDriverConnect Options */
112 public const int SQL_DRIVER_NOPROMPT
= 0;
113 public const int SQL_DRIVER_COMPLETE
= 1;
114 public const int SQL_DRIVER_PROMPT
= 2;
115 public const int SQL_DRIVER_COMPLETE_REQUIRED
= 3;
118 public const int SQL_NO_NULLS
= 0;
119 public const int SQL_NULLABLE
= 1;
120 public const int SQL_NULLABLE_UNKNOWN
= 2;
122 /* Defines for SQLBindParameter and SQLProcedureColumns */
123 public const int SQL_PARAM_TYPE_UNKNOWN
= 0;
124 public const int SQL_PARAM_INPUT
= 1;
125 public const int SQL_PARAM_INPUT_OUTPUT
= 2;
126 public const int SQL_RESULT_COL
= 3;
127 public const int SQL_PARAM_OUTPUT
= 4;
128 public const int SQL_RETURN_VALUE
= 5;