This should fix #76928. This fix incorporates ideas from a patch
[mono.git] / mcs / class / System.Data / System.Data.Odbc / ChangeLog
1 2005-11-21  Senganal T <tsenganal@novell.com>
2
3         * OdbcTransaction.cs
4         * OdbcCommandBuilder.cs
5         * OdbcParameterCollection.cs
6         * OdbcDataReader.cs
7         * OdbcFactory.cs
8         * OdbcDataAdapter.cs
9         * OdbcParameter.cs
10         
11         Added stubs and other changes for ADO.NET 2.0 compatibility
12
13 2005-10-14  Senganal T <tsenganal@novell.com>
14
15         * OdbcColumn.cs : Changed the mapping of OdbcType.Char to string
16         instead of char. Fixes bug #67269
17
18 2005-10-14  Senganal T <tsenganal@novell.com>
19
20         * OdbcDataReader.cs: Added Text and NText datatypes to the list
21         of datatypes checked by GetValue () method. Fixes bug #75032
22
23 2005-10-14  Sureshkumar T  <tsureshkumar@novell.com>
24
25         * OdbcDataReader.cs (GetValue): Use SQL_CHAR for Numeric as
26         temporary fix.
27
28         * OdbcParameter.cs (CopyValue): Add support for Numeric & Decimal
29         parameters.
30
31 2005-10-08  Sureshkumar T  <tsureshkumar@novell.com>
32
33         * OdbcCommand.cs (BindParameters): Copy the parameter Value after
34         binding.
35
36         * OdbcParameter.cs: re-implemented the native buffer handling and
37         odbc type handling.
38
39         * NativeBuffer.cs: A native buffer class to hold pointer to native
40         memory.
41
42         * OdbcTypeMap.cs (OdbcTypeMap): structure to hold different odbc
43         types and the default mapping.
44
45         * OdbcTypeConverter.cs: Simplified mapping between different odbc
46         types using switch-case.
47
48         * libodbc.cs (SQLBindParameter): use only one entry point and use
49         IntPtr instead of ref.
50
51 2005-08-20  Gert Driesen  <drieseng@users.sourceforge.net>
52
53         * OdbcDataReader.cs: Marked GetPrimaryKeysBySQLStatistics unsafe.
54         This fixes the build on Windows (using csc).
55
56 2005-08-09  Sureshkumar T  <tsureshkumar@novell.com>
57
58         * OdbcDataReader.cs: GetSchemaTable (): set values for the column
59         attributes using SQLColAttribute. If SQLPrimaryKeys does not
60         yeild, try SQLStatistics. Optimized primary key logic.
61
62         * libodbc.cs: Added api SQLStatistics and constants.
63
64         * OdbcParameter.cs: setBuffer (): allocate a short int buffer for
65         OdbcType.SmallInt. fixes bug #75600.
66
67 2005-08-08  Gert Driesen  <drieseng@users.sourceforge.net>
68
69         * OdbcConnection.cs: Marked Init helper method private.
70         * OdbcCommand.cs: Marked BindParameters helper method private.
71
72 2005-08-08  Sureshkumar T  <tsureshkumar@novell.com>
73
74         * OdbcDataReader.cs: Implemented Dispose pattern. Cache
75         schematable for same result set. don't free command's statements
76         if the command is prepared.
77
78         * OdbcConnection.cs: Open (): set disposed to false so that close
79         will be called in Dispose.
80
81         * OdbcCommand.cs:
82         - Prepare (): Split SQLPrepare and SQLBind so that
83         already prepared statements can be reused with new parameter
84         values.
85         - ExecSQL (): create new statement handle, if not prepared
86         and there are no parameters. if there are parameters, prepare and
87         use.
88         - Implemented Dispose pattern
89         - Streamlined the allocation and de-allocation of statement
90         handles.
91
92 2005-08-05  Sureshkumar T  <tsureshkumar@novell.com>
93
94         * OdbcDataReader.cs: RecordsAffected: get value from command.
95         GetSchemaTable (): set IsExpression based on BaseTableName. set
96         AllowDBNull to false if the column is PK.
97
98         * OdbcCommand.cs: correct UpdatedRowSource is returned. whitespace
99         changes to conform to standard.
100
101         * OdbcCommandBuilder.cs: Implemented.
102
103         * OdbcParameter.cs: Direction is set to Input by default.
104
105 2005-07-22  Sureshkumar T  <tsureshkumar@novell.com>
106
107         * OdbcParameter.cs: updated attributes & attribute descriptions to
108         match with masterinfos.
109
110         * OdbcDataReader.cs: NextRow (): made private.
111
112 2005-07-21  Sureshkumar T  <tsureshkumar@novell.com>
113
114         * OdbcDataReader.cs: GetValue (): added case for OdbcType.Bit. and
115         Formatting corrections. Fixes bug #75574.
116
117 2005-07-07  Sureshkumar T  <tsureshkumar@novell.com>
118
119         * OdbcTypeConverter.cs: ConvertToSqlType & ConvertToSqlCType: map
120         VarChar to SQL_C_CHAR and SQL_VARCHAR respective instead of WCHAR
121         and WVARCHAR as temporary fix.
122
123         * OdbcParameter.cs: setBuffer: string types need not be quoted.
124
125 2005-06-28  Sureshkumar T  <tsureshkumar@novell.com>
126
127         * OdbcDataReader.cs: GetPrimaryKeys (): use the length indicator
128         for GetString, otherwise, it creates a string of length 255. Use
129         ArrayList for keys as the columns are different from the selected
130         columns. fixes bug #75263.
131
132 2005-06-09  Sureshkumar T  <tsureshkumar@novell.com>
133
134         * OdbcDataReader.cs: GetValue (): return decimal in case of odbc
135         type Numeric. Move the temp buffer logic inside.
136
137         * OdbcTypeConverter.cs: map SQL_TYPE.NUMERIC to SQL_C_TYPE.CHAR by
138         now, since PgSql driver seems not to accept NUMERIC c type. Other
139         database anyway, provides NUMERIC datatype as DECIMAL.
140
141 2005-05-31  Sureshkumar T  <tsureshkumar@novell.com>
142
143         * OdbcParameter.cs: setBuffer (): for numeric type, the buffer
144         parameter should be a packed decimal struct. fixes bug #75041.
145
146 2005-04-05  Sureshkumar T  <tsureshkumar@novell.com>
147
148         * OdbcParameter.cs: SqlBindParameter requires the last parameter
149         to be a ref.
150         * libodbc.cs: API change for above.
151
152 2005-04-04  Sureshkumar T  <tsureshkumar@novell.com>
153
154         * OdbcDataReader.cs: Ignore BaseTableName & BaseColumnName
155         properties while building Schema information as most drivers
156         ignores these properties. e.g. PostgreSQL.
157
158 2005-03-24  Sureshkumar T  <tsureshkumar@novell.com>
159             Appasamy <appasamy@rediffmail.com>
160
161         * OdbcColumn.cs: IsStringType: OdbcType.Char is also of type
162         String.
163         * OdbcDataReader.cs: GetSchemaTable: Get Additional info using
164         SQLColAttribute. Don't pad with spaces in GetColAttributeStr.
165
166 2005-03-24  Sureshkumar T  <tsureshkumar@novell.com>
167
168         * OdbcDataReader.cs:
169         - GetValue: Decode only outsize length for SQL_C_TYPE.CHAR type in
170         SQLGetData.
171         - GetOrdinal: Perform case insensitive lookup if sensitive lookup
172         fails.
173
174 2005-03-22  Sureshkumar T  <tsureshkumar@novell.com>
175             Appsamy <appasamy@rediffmail.com>
176
177         * libodbc.cs (System.Data.Odbc): Added enum FieldIdentifier. Added
178         library functions SQLPrimaryKeys, SQLBindCol and SQLColAttribute.
179
180         * OdbcDataReader.cs: Implemented GetPrimaryKeys to get the primary
181         keys associated with resultset using SQLPrimaryKeys.
182
183 2005-03-15  Sureshkumar T  <tsureshkumar@novell.com>
184
185         * OdbcConnection.cs: re-throw error on exception in Open method.
186
187 2005-03-11  Sureshkumar T  <tsureshkumar@novell.com>
188
189         * OdbcConnection.cs : notify state change through event. clean up
190         handles in case any exception while opening a connection. NET_2_0
191         uses base class's OnStateChange handler.
192
193 2005-03-10  Sureshkumar T  <tsureshkumar@novell.com>
194
195         Migrated core classes to derive from ProviderBase instead of
196         implementing IDb* interfaces. Most part of these files have been
197         branched with #if NET_2_0/ONLY_1_1. Make sure any changes works
198         with both the profiles.
199
200         * OdbcFactory.cs: Concrete Factory for DbProviderFactory. Factory
201         to generate Connection,Command,etc.
202
203         * OdbcConnectionFactory.cs: Concrete factory for DbConnectionFactory.
204
205         * OdbcTransaction.cs: migration and overrides.
206         * OdbcCommandBuilder.cs: migration and overrides.
207         * OdbcDataReader.cs: --do--. no command behavior member as it will
208         be maintained in base provider class.
209         * OdbcParameterCollection.cs: --do--. Now, local ArrayList is not
210         maintained here, instead it is in base class. Most of the methods
211         which operated on this list are not needed in NET_2_0.
212         * OdbcConnection.cs: Migration. connectionString is maintained in
213         DbConnectionBase class.
214         * OdbcParameter.cs: Migration. Many of the local members like
215         value,sourceColumn are maintained in DbParameterBase.
216         * OdbcCommand.cs: Migration. commandText,timeout and
217         commandTimeOut are maintained in DbCommandBase class.
218
219 2005-03-10  Sureshkumar T  <tsureshkumar@novell.com>
220
221         * OdbcType.cs: Added enums for SQL_TYPE & SQL_C_TYPE.
222         
223         * libodbc.cs: Accept SQL_C_TYPE for driver
224         parameters. SQLBindParameter takes two parameters SQL_TYPE and
225         SQL_C_TYPE. This caused the whole lot of changes done in this
226         revision.
227         
228         * OdbcParameter.cs: Set default values of OdbcType & DbType. Pass
229         mapped SQL_TYPE and SQL_C_TYPE to SQLBindParameter. Increase
230         buffer size by 2 for additional ' chars.
231         
232         * OdbcTypeConverter.cs: Added class to convert between OdbcType,
233         SQL_TYPE, SQL_C_TYPE.
234         
235         * OdbcColumn.cs: Added private members for SQL_TYPE and
236         SQL_C_TYPE. conversion from/to odbctype to/from SQL_TYPE is done
237         through OdbcTypeConverter class.
238         
239         * OdbcDataReader.cs: use OdbcColumn's SQL_C_TYPE member. It keeps
240         track of default mapping between odbctype, SQL_TYPE and
241         SQL_C_TYPE. Move dataTableSchema.AcceptChanges inside if condition
242         to avoid null reference exception.
243
244 2005-02-04  Sureshkumar T  <tsureshkumar@novell.com>
245             Appasamy <appasamy@rediffmail.com>
246
247         * OdbcConnection.cs: Implemented properties database, datasource,
248         serverversion and driver.
249         * libodbc.cs: Added type OdbcInfo and native call SQLGetInfo.
250
251 2005-01-20  Sureshkumar T  <tsureshkumar@novell.com>
252
253         * OdbcDataReader.cs: case for type OdbcType.Double added in
254         GetValue.  fixes bug #71173.
255
256         Thanks to patch given by "Appasamy T" <appasamy@rediffmail.com>
257
258 2005-01-19  Sureshkumar T  <tsureshkumar@novell.com>
259
260         * OdbcType.cs: Change enum values for compatiability with MS.NET.
261         * libodbc.cs: Change enum values for compatiability with
262         MS.NET. Change calls into driver with native type.
263         * OdbcDataReader.cs: Change enum values for compatiability with
264         MS.NET. Change calls from/into driver with native type.
265
266 2005-01-18  Sureshkumar T  <tsureshkumar@novell.com>
267
268         * OdbcDataReader.cs: GetOrdinal need not check for
269         currentRow. Return -1 if column name is not found.
270
271         fixes bug #71261. Thanks to patch given by "Appasamy T"
272         <appasamy@rediffmail.com>.
273
274 2005-01-13  Sureshkumar T  <tsureshkumar@novell.com>
275
276         * OdbcDataReader.cs: Implement NextResultSet for multiple result
277         set queries. 
278         
279         * OdbcDataReader.cs: build column schema once creating reader and
280         then for each Next result set. Thanks to
281         sebastien.robitaille@croesus.com (Sebastien Robitaille) for
282         pointing out this optimization (bugzilla #70530).
283
284         * libodbc.cs: Added library calls SQLFreeStmt and SQLMoreResults
285         for mutiple resultsets.
286
287 2005-01-10  Sureshkumar T  <tsureshkumar@novell.com>
288
289         * OdbcDataReader.cs: Connection has to be closed only after
290         Statement handle is freed. fixes bug #70048.
291
292 2005-01-07  Sureshkumar T  <tsureshkumar@novell.com>
293
294         * OdbcDataReader.cs: Pass OdbcCType.SignedBigInt for accessing big
295         int columns.
296
297         * OdbcType.cs: Added a new enum for Odbc C DataTypes. This should
298         essentially be passed to drivers, since the public OdbcType types
299         differs from types expected in drivers in some cases.
300
301         * libodbc.cs : Added a ODBC method which takes OdbcCType
302         enumeration for SQLGetData for BigInt fields.
303
304         fixes bug #65342.
305
306 2004-12-28  Duncan Mak  <duncan@ximian.com>
307
308         * libodbc.cs: Change all the DllImport attributes to point to
309         "odbc32.dll" instead of "odbc32", because /etc/mono/config lists
310         "odbc32.dll" (all other entries in the file have the .dll suffix
311         as well, for consistency's sake, let's rename it here.)
312
313         This fixes #70727.
314         
315 2004-12-03  Sureshkumar T  <tsureshkumar@novell.com>
316
317         * OdbcParameter.cs: Fixed a null reference exception when a
318         parameter is created and its value is not set. #68750.
319
320 2004-11-26  Sureshkumar T  <tsureshkumar@novell.com>
321
322         * OdbcParameter.cs: Fixed Parameter Size property as well as
323         insufficient buffer errors. bug #68749.
324
325 2004-09-14  Sebastien Pouliot  <sebastien@ximian.com>
326
327         * OdbcPermission.cs: Added internal constructor accepting an Odbc
328         PermissionAttribute parameter (using base class protected ctor).
329         * OdbcPermissionAttribute.cs: Copy now use the new OdbcPermission
330         constructor.
331
332 2004-09-13  Sebastien Pouliot  <sebastien@ximian.com>
333
334         * OdbcPermission.cs: Mostly completed (needs tests).
335         * OdbcPermissionAttribute.cs: Completed.
336
337 2004-08-31 Umadevi S (sumadevi@novell.com)
338         * OdbcDataReader.cs - Fixed Decimal parsing
339
340 2004-08-30 Umadevi S (sumadevi@novell.com)
341         * OdbcType.cs - removed inheritance from short.
342
343 2004-08-27 Sureshkumar T (tsureshkumar@novell.com)
344         * OdbcDataReader.cs - fixed bug #63539 - TINYINT ODBC datatype is converted into System.Byte
345
346 2004-08-26 Sureshkumar T (tsureshkumar@novell.com)
347         * OdbcDataReader.cs - Date & DateTime GetValue fixed. 
348                               GetBytes ordinal parameter passing fixed for BINARY in GetValue.
349
350 2004-08-20 Sureshkumar T (tsureshkumar@novell.com)
351         * OdbcConnection.cs - correct handles are passed to OdbcError exception to trap the correct error
352
353 2004-08-04 Umadevi S (sumadevi@novell.com)
354         * OdbcDataReader.cs - Fixed bug 61832 - Column names were not filled, due to which name based lookup of columns failed.
355                                                                                                   
356
357 2004-08-04 Umadevi S (sumadevi@novell.com)
358         * OdbcDataReader.cs - Fixed bug 61405 - Handling smallint column type.
359
360 2004-07-30  Sureshkumar T (tsureshkumar@novell.com)
361         * OdbcCommand.cs: ExecuteNonQuery Closed statement handle to fix memory leak
362         * OdbcDataReader.cs: Closed statement handle to fix memory leak
363                              Removed SQLState login in GetBytes coz OdbcError provides the same.
364                                     
365 2004-07-29 Umadevi S (sumadevi@novell.com)
366         * OdbcCommand.cs - Fixed bug 62046. ExecuteNonQuery implemented correctly
367                                                                                                     
368
369 2004-07-28 Umadevi S (sumadevi@novell.com)
370         * OdbcParameter.cs - fixed bug 61968. String values passed with quotes
371                                                                                                  
372
373 2004-07-07 Umadevi S (sumadevi@novell.com)
374         * OdbcConnection.cs - Allowed Close to be called multiple times
375                             - Implementation of Dispose method
376
377 2004-07-07 Umadevi S (sumadevi@novell.com)
378         * OdbcCommand.cs : fixed set method for Transaction
379                                                           
380 2004-07-01  Sureshkumar T (tsureshkumar@novell.com)
381         * OdbcCommand.cs   : fixed reader problem with ExecuteScalar
382
383 2004-06-23  Sureshkumar T (tsureshkumar@novell.com)
384         * OdbcConnection.cs: Fix: Moved env allocation to Open method. 
385                              Disconnection & freeing handles are done in Close 
386                              method to avoid simultaneous connections.
387         * libodbc.cs       : Added constants for odbc version.
388                                     
389 2004-06-16  Gert Driesen <drieseng@users.sourceforge.net>
390
391         * OdbcError.cs: fixed serialization compatibility with MS.NET
392         * OdbcErrorCollection.cs: fixed serialization compatibility with
393         MS.NET
394         * OdbcException.cs: fixed serialization compatibility with MS.NET
395
396 2004-06-16  Sureshkumar T (tsureshkumar@novell.com)
397         * OdbcDataReader.cs: Added GetValue support for Sql Binary type to return byte array.
398                              Implemented GetBytes method.
399         * libodbc.cs       : Added enums, constants & imports for above fix.
400
401 2004-06-13  Gert Driesen <drieseng@users.sourceforge.net>
402
403         * OdbcDataReader.cs: changed GetData method to return IDataReader
404         to match MS.NET
405
406 2004-06-09  Sureshkumar T (tsureshkumar@novell.com)
407         * OdbcDataReader.cs: Removed checking of currentRow in GetName
408           method
409
410 2004-06-04  Gert Driesen <drieseng@users.sourceforge.net>
411
412         * OdbcPermission.cs: moved Obsolete attribute to correct
413         ctor
414
415 2004-06-02  Sureshkumar T (tsureshkumar@novell.com)
416        
417         * OdbcDataReader.cs: Implemented GetByte method. Fixed bug #58820
418
419 2004-06-02  Gert Driesen <drieseng@users.sourceforge.net>
420
421         * OdbcParameter.cs: added missing attributes
422         * OdbcPermission.cs: added missing attributes
423         * OdbcConnection.cs: fixes attribute, added missing attributes
424         * OdbcInfoMessageEventArgs.cs: removed extra properties, fixed
425         API compatibility with MS.NET
426         * OdbcCommandBuilder.cs: use correct attributes
427
428 2004-05-20  Gert Driesen (drieseng@users.sourceforge.net)
429
430         *  OdbcPermissionAttribute.cs: change AllowMultiple and
431         Inherited to match .NET
432
433 2004-05-17 Umadevi S (sumadevi@novell.com)
434         * OdbcPermissionAttribute, OdbcPermission.cs - fixed missing methods
435
436 2004-05-17 Gert Driesen (drieseng@users.sourceforge.net)
437         * OdbcCategoryAttribute.cs: fixed namespace
438         * OdbcDataAdapter.cs: removed extra attributes
439         * OdbcDescriptionAttribute.cs: fixed namespace
440
441 2004-05-14 Umadevi S (sumadevi@novell.com)
442         * OdbcParameterConverter.cs -Added 
443         * OdbcParameter.cs - Added some attributes      
444
445 2004-05-14 Umadevi S (sumadevi@novell.com)
446         * OdbcDataAdapter.cs - Added Attributes
447
448 2004-05-14 Umadevi S (sumadevi@novell.com)
449         * OdbcConnection.cs - Added Attributes
450
451 2004-05-14 Umadevi S (sumadevi@novell.com)
452         * OdbcCommand.cs - Added Attributes
453
454 2004-05-14 Umadevi S (sumadevi@novell.com)
455         * OdbcDataReader.cs - Added Attributes
456
457 2004-05-14 Umadevi S (sumadevi@novell.com)
458         * Added Classes OdbcCategoryAttribute.cs, OdbcDescriptionAttribute.cs
459
460 2004-05-14 Umadevi S (sumadevi@novell.com)
461         * Added Class OdbcCommandBuilder.cs
462
463 2004-05-14 Umadevi S (sumadevi@novell.com)
464         * Added classes OdbcInfoMessageEventArgs.cs - with stubs
465         * Added classes OdbcInfoMessageEventInfo.cs     
466
467 2004-05-14 Umadevi S (sumadevi@novell.com)
468         * Added classes OdbcPermission.cs, OdbcPermissionAttribute.cs - with stubs
469
470 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
471         * OdbcException.cs : removed ErrorCode property, fixing signature
472         * OdbcErrorCollection.cs : added internal ctor, reduced 
473         accessibility of Add method to internal
474         * OdbcCommand.cs: marked hstmt field private, remove setters for
475         Parameters property
476         * OdbcDataReader.cs: Added GetDate method, renamed GetTimeSpan to
477         GetTime to match MS.NET, added HasRows stub
478
479 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
480         * OdbcError.cs: 
481         * OdbcErrorCollection.cs:
482         * OdbcException.cs: fixed linefeeds to DOS to match other
483         sources in System.Data.Odbc
484
485 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
486         * OdbcCommand.cs: No longer use OdbcConnection.Datareader, in order 
487         to fix signature of OdbcConnection
488         * OdbcDataReader.cs: No longer use ODbcConnection.Datareader, in 
489         order to fix signature of OdbcConnection
490         * OdbcConnection.cs: Signature fixes: removed DataReader property, 
491         added setter for ConnectionTimeout, made transaction internal
492         * OdbcParameter.cs: reduced accessibility of Bind method to 
493         internal, added setter for IsNullable
494         * OdbcParameterCollection.cs: made default ctor and Bind method
495         internal
496
497 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
498         * OdbcCommand.cs: fixed linefeeds to DOS to match other sources
499         in System.Data.Odbc
500
501 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
502         * OdbcTransaction.cs: fixed signature to match MS.NET
503
504 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
505         * OdbcType.cs: fixed typo UniqueIndetifier
506         * OdbcColumn.cs : fixed typo UniqueIndetifier
507
508 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
509         * OdbcType.cs: fixed linefeeds to DOS to match other sources
510         in System.Data.Odbc
511
512 2003-12-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
513
514         * OdbcTransaction.cs: applied patch from Jeff Seifert that makes
515         this class implement IDbTransaction interface.
516
517 2002-11-01  Daniel Morgan <danmorg@sc.rr.com>
518
519         * OdbcDataReader.cs: - uncommented code, but I put a FIXME:
520         according to Brian, this does not work on MS .NET however, we need it
521         for Mono for now. schemaRow.AcceptChanges(),
522         - implement IEnumerable.GetEnumerator()
523     
524         * libodbc.cs: changed the DllImport from "odbc32.dll" to "odbc32"
525     
526 2002-10-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
527
528         * ChangeLog: added.
529         * OdbcError.cs:
530         * OdbcException.cs: added dummy implementation for these missing
531         classes.
532