Merge pull request #213 from linquize/linquize-master
[mono.git] / mcs / class / System.Data / System.Data.Odbc / ChangeLog
1 2011-03-22  Veerapuram Varadhan  <v.varadhan@gmail.com>
2
3         ** Fixes #676368 - Patch by 0richardkk.novell@chiark.greenend.org.uk
4         * OdbcConnection.cs: Make linking/unlinking of OdbcCommands thread safe.
5         * OdbcCommand.cs: Check generation object from connection in order to 
6         free the associated statement handle.
7         
8 2010-12-07  Veerapuram Varadhan  <vvaradhan@novell.com>
9
10         ** Fixes #456234 - Patch by amc1999@gmail.com
11         * OdbcDataReader.cs (GetValue): Handle SQL_NO_TOTAL sanely and 
12         use corresponding Decoder.GetChars instead of Encoding.GetString.
13         
14 2010-06-15 Jonathan Chambers  <joncham@gmail.com>
15
16         * OdbcDataReader.cs: Remove unneeded cast on ref parameter
17
18 2009-07-15  Veerapuram Varadhan  <vvaradhan@novell.com>
19
20         * OdbcParameter.cs (OdbcType): Return appropriate type from the typeMap.
21         
22 2009-02-20  Veerapuram Varadhan  <vvaradhan@novell.com>
23
24         * OdbcDataReader.cs (GetValue): Handle null image data.  Fixes ##419224
25         Patch by John Mortlock <johnm@hlaustralia.com.au>.
26         
27 2009-01-18  Gert Driesen  <drieseng@users.sourceforge.net>
28
29         * OdbcDataReader.cs: Fixed GetBytes with limited length. Added reader
30         state and argument checks.
31
32 2009-01-18  Gert Driesen  <drieseng@users.sourceforge.net>
33
34         * OdbcCommand.cs: Do not allow negative CommandTimeout. Reject invalid
35         value for CommandType and UpdatedRowSource. In Dispose, clear
36         CommandText (2.0 only) and Parameters. Include method that is being
37         executed in the exception messages for Connection and CommandText
38         verification.
39
40 2009-01-03  Gert Driesen  <drieseng@users.sourceforge.net>
41
42         * OdbcCommandBuilder.cs (QuoteIdentifier): Escape QuoteSuffix
43         character(s) in unquoted identifier.
44
45 2008-12-30  Gert Driesen  <drieseng@users.sourceforge.net>
46
47         * OdbcColumn.cs: Treat OdbcType.Numeric as decimal.
48         * OdbcConnection.cs: Keep (weak) list of commands to allow us to
49         dispose them (and free their corresponding statement handles) when
50         the connection is closed. Fixed bug #341743.
51         * OdbcCommand.cs: Add internal Unlink method that is invoked when the
52         OdbcConnection is disposed, and which frees the statement handle.
53         Modified ExecuteNonQuery helper to take CommandBehavior and rename
54         freeHandle argument to createReader. Added CommandBehavior argument
55         to ExecSQL. Added FreeStatement overload that takes an option to not
56         perform an unlink. Fixes bug #3417434.
57
58 2008-12-30  Gert Driesen  <drieseng@users.sourceforge.net>
59
60         * libodbc.cs: Add IdentifierQuoteChar to OdbcInfo.
61         * OdbcCommandBuilder.cs: Return a zero-length string when QuotePrefix
62         or QuoteSuffix are not set (or are set to null). Changing QuotePrefix
63         or QuoteSuffix after a command has been generated should result in an
64         InvalidOperationException. Implemented support for obtaining
65         character(s) for quoting identifiers from specified connection.
66         Modified generated SQL to match MS.
67         * OdbcConnectionStringBuilder.cs: Improved special casing of Driver
68         and Dsn keywords. Re-use implemenation of DbConnectionStringBuilder.
69         Improved argument checks to match MS.
70
71 2008-10-09 Gonzalo Paniagua Javier <gonzalo@novell.com>
72
73         * OdbcDataReader.cs: apply patch from Steve ? that fixes bug #433741.
74         GetBytes() was returning only the last byte.
75
76 2008-08-26  Veerapuram Varadhan  <vvaradhan@novell.com>
77
78         Patch provided by Ernesto <equistango@gmail.com>
79         * OdbcDataReader.cs: Don't call GetSchemaTable in the constructor
80         instead just get column information.  Enhances performance of
81         DataReader.
82         
83 2008-08-26  Veerapuram Varadhan  <vvaradhan@novell.com>
84
85         Patch provided by Ernesto <equistango@gmail.com>
86         * OdbcParameter.cs (CopyValue): Handle Binary type along with
87         VarBinary and Image. 
88         
89 2008-07-06  Sebastien Pouliot  <sebastien@ximian.com>
90
91         * OdbcDataReader.cs: Fix unneeded self-assignment for 'length'. Also
92         fix a bad setter where "value = behavior" instead of "behavior = value"
93         [Found using Gendarme ReviewSelfAssignmentRule]
94
95 2008-04-21  Gert Driesen  <drieseng@users.sourceforge.net>
96
97         * OdbcParameterCollection.cs: Changed argument names to match MS.
98         Code formatting.
99
100 2008-03-24  Gert Driesen  <drieseng@users.sourceforge.net>
101
102         * OdbcTransaction.cs: Use internal CreateOdbcException method on
103         OdbcConnection to create OdbcException.
104         * OdbcException.cs: Added support for multiple OdbcError instances
105         and fixed Message property on 2.0 profile.
106         * OdbcCommand.cs: Use internal CreateOdbcException method on
107         OdbcConnection to create OdbcException. Code formatting.
108         * OdbcError.cs: Moved code to obtain ODBC error info to newly
109         introduced CreateOdbcException on OdbcConnection. Code formatting.
110         * OdbcDataReader.cs: Use internal CreateOdbcException method on
111         OdbcTransaction to create OdbcException.
112         * OdbcParameterCollection.cs: Removed obsolete Bind method.
113         * OdbcConnection.cs: Added SafeDriver property that returns
114         name of driver if available and a zero-length string otherwise.
115         Use CreateOdbcException method to create OdbcException from ODBC
116         error info. Added CreateOdbcException method to construct
117         OdbcException from all available ODBC error info.
118         * OdbcParameter.cs: Use internal CreateOdbcException method on
119         OdbcConnection to create OdbcException.
120
121 2008-03-23  Gert Driesen  <drieseng@users.sourceforge.net>
122
123         * OdbcErrorCollection.cs: Corcompare fixes and code formatting.
124         * OdbcCommandBuilder.cs: Corcompare fixes and code formatting.
125         * OdbcPermission.cs: Corcompare fixes and code formatting.
126         * OdbcDataReader.cs: Corcompare fixes and code formatting.
127         * OdbcParameterCollection.cs: Corcompare fixes and code formatting.
128         * OdbcConnection.cs: Corcompare fixes and code formatting. Use
129         unicode encoding in ChangeDatabase and GetInfo.
130         * OdbcDataAdapter.cs: Corcompare fixes and code formatting.
131         * OdbcParameter.cs: Corcompare fixes and code formatting.
132
133 2008-03-21  Gert Driesen  <drieseng@users.sourceforge.net>
134
135         * libodbc.cs: Always use unicode version of ODBC functions. Fixes part
136         of bug #372823.
137         * OdbcTypeMap.cs: Fixed mapping for NChar, NText and NVarChar.
138         * OdbcDataReader.cs (GetColumn): Use Unicode encoding to decode
139         column name buffer.
140         (GetDataTypeName): Use SQLColAttribute to determine type name of
141         column.
142         (GetValue): Fixed retrieving value of nchar column. When retrieving
143         variable length unicode value, use Unicode encoding to decode buffer
144         and remove trailing null characters. Fixes bug #364430.
145
146 2008-03-03  Veerapuram Varadhan  <vvaradhan@novell.com>
147
148         ** Fixes Bug#324025
149         * OdbcDataReader (GetString): Use Convert.ToString() to return
150         appropriate typed values.
151         (GetValue): Fixes a regression. 
152         
153 2008-03-03  Veerapuram Varadhan  <vvaradhan@novell.com>
154
155         * OdbcCommandBuilder.cs: Clean up.
156         
157 2008-03-03  Veerapuram Varadhan  <vvaradhan@novell.com>
158
159         ** Fixes Bug#340451 - patch provided by Ernesto Carrea
160         <equistango@gmail.com>
161         * OdbcConnection.cs (GetInfo): Trim the value to actual length
162         returned by libodbc.
163         
164 2008-03-03  Veerapuram Varadhan  <vvaradhan@novell.com>
165
166         ** Fixes from BNC#332809 - patch provided by Ernesto Carrea
167         <equistango@gmail.com>
168         * OdbcParameter.cs (Bind): Do not allocate buffer if value is
169         DBNull.
170         * OdbcTypeConverter.cs (InferFromValue): Incase of DBNull, do not
171         throw exception, instead return NVarChar to match MS.NET
172         implementation.
173         
174 2008-03-03  Ankit Jain  <jankit@novell.com>
175
176         * OdbcMetaDataCollectionNames.cs: Set the field values.
177
178 2008-02-26  Veerapuram Varadhan  <vvaradhan@novell.com>
179
180         ** Fixes BNC#364432.
181         * OdbcParameter.cs: (Bind): Set StrLen parameter of
182         SQLBindParameter to reflect NullData in case of DBNull.
183         (CopyValue): If Value is DBNull.Value, just don't try any
184         heroics. 
185         
186 2008-02-25  Veerapuram Varadhan  <vvaradhan@novell.com>
187
188         ** Fixes BNC#364426.
189         * OdbcDataReader.cs: (GetValue): Map OdbcType.Time to
190         System.TimeSpan.  
191
192         * OdbcTypeConverter.cs: (GetTypeMap): Map OdbcType.Time and
193         SqlType.TIME to corresponding types. 
194
195         * OdbcColumn.cs: -- ditto --
196         
197 2008-02-20  Veerapuram Varadhan  <vvaradhan@novell.com>
198
199         * OdbcDataReader.cs: (GetValue): Handle cases when certain 
200         ODBC drivers return unexpected results.  Fixes #326740.  Patch 
201         provided by Mark Junker <mjscod@gmx.de>.
202         
203 2008-01-16  Veerapuram Varadhan  <vvaradhan@novell.com>
204
205         * OdbcCommandBuilder.cs: Implemented 2.0 APIs and code
206         restructuring. 
207         
208 2007-10-28  Gert Driesen  <drieseng@users.sourceforge.net>
209
210         * OdbcDataReader.cs: Code formatting, spaces to tabs.
211
212 2007-10-20  Gert Driesen  <drieseng@users.sourceforge.net>
213
214         * OdbcCommand.cs: Added constant for default CommandTimeout, instead
215         of using a magic number. Avoid unnecessary initialization. Fixed
216         default value for DesignTimeVisible. Return zero-length string if
217         CommandText is null. Spaces to tabs and code formatting.
218         * OdbcError.cs: Fixed typo in exception message.
219         * OdbcConnection.cs: Return zero-length string if ConnectionString is
220         null. In getters for Database, DataSource and Driver return a
221         zero-length string if connection is closed. In BeginTransaction and
222         GetSchema throw InvalidOperationException if connection is closed.
223         Added override for GetSchema (string, string []). Use string.Empty
224         instead of "".
225         * OdbcDataAdapter.cs: Avoid unnecessary initializations. Use direct
226         assignment in IDbDataAdapter implementation. In default ctor, set
227         SelectCommand to null.
228
229 2007-10-19  Gert Driesen  <drieseng@users.sourceforge.net>
230
231         * OdbcTransaction.cs: Clear connection in Commit and Rollback.
232         In IsolationLevel, throw IOE if transaction is no longer open.
233
234 2007-10-19  Gert Driesen  <drieseng@users.sourceforge.net>
235
236         * OdbcTransaction.cs: Keep state of the transaction, and update it
237         when performing commit or rollback. In Dispose (bool), only perform
238         a rollback if transaction was not committed or rollback before.
239         In Commit and Rollback, throw an InvalidOperationException if
240         transaction is no longer open.
241
242 2007-10-19  Gert Driesen  <drieseng@users.sourceforge.net>
243
244         * OdbcTransaction.cs: Use OdbcIsolationLevel enum value instead of
245         magic numbers. For Snapshot isolation level, the attribute
246         SQL_COPT_SS_TXN_ISOLATION must be used instead. When isolation level
247         is Unspecified, then do not modify the isolation level at all and
248         lazy initlization the IsolationLevel property. Modified exceptions
249         for invalid / not supported isolation levels to match MS.
250         * libodbc.cs: Added attribute for changing SQL Server specific
251         connection option. Added enum for ODBC isolation level options.
252         Added SQLGetConnectAttr method.
253
254 2007-10-19  Gert Driesen  <drieseng@users.sourceforge.net>
255
256         * libodbc.cs: Spaces to tabs. Code formatting.
257         * OdbcConnection.cs: Spaces to tabs. Code formatting.
258         * OdbcTransaction.cs: Code formatting.
259
260 2007-10-19  Nagappan <anagappan@novell.com> 
261
262         * OdbcCommandBuilder.cs, OdbcParameterCollection.cs: Code alignment.
263         * OdbcDataReader.cs: Fixes numeric columns, bug # 332404.
264
265 2007-10-19  Nagappan <anagappan@novell.com> 
266
267         * OdbcCommand.cs: (Clone): Implemented new method. Code alignment.
268
269 2007-10-12  Nagappan <anagappan@novell.com> 
270
271         * OdbcDataReader.cs: Bug 332400 - ODBC and LONGBLOB columns. Thanks to
272           Ernesto Carrea <equistango@gmail.com> for the patch and the test case.
273
274 2007-10-08  Marek Safar <marek.safar@gmail.com> 
275
276         * OdbcParameterCollection.cs (SetParameter): Fixed missing cast.
277
278 2007-09-27  Nagappan A <anagappan@novell.com> 
279
280         * OdbcTransaction.cs: AutoCommit and BeginTransaction fix. Thanks to
281           Mads Bondo Dydensborg <mbd@dbc.dk> and Amc <amc1999@gmail.com> for
282           providing this patch.
283
284 2007-09-25  Nagappan A  <anagappan@novell.com>
285
286         * OdbcParameter.cs (ResetOdbcType, ResetDbType): Implemented
287         missing methods. 2.0 attribute fixes.
288
289         * OdbcInfoMessageEventArgs.cs (Message, Errors, ToString):
290         Implemented missing properties and methods. 2.0 attribute fixes.
291
292         * OdbcConnection.cs (InfoMessage): Added public event and relevant
293         private APIs. 2.0 attribute fixes.
294
295         * OdbcConnectionStringBuilder.cs: 2.0 attribute fixes.
296
297         * OdbcParameterCollection.cs (GetParameter, SetParameter):
298         Implemented missing 2.0 APIs and 2.0 attribute fixes.
299
300         * OdbcDataReader.cs (finalize): 2.0 compatibility fixes.
301
302         * OdbcPermission.cs (Add): 2.0 compatibility fixes.
303
304         * OdbcCommandBuilder.cs: 2.0 attribute fixes.
305
306         * OdbcRowUpdatingEventArgs.cs (BaseCommand): Added 2.0 property.
307
308         * OdbcCommand.cs: 2.0 attribute fixes.
309
310         * OdbcException.cs: 2.0 attribute fixes.
311
312 2007-09-11  AMC  <amc1999@gmail.com>
313
314         * OdbcDataReader.cs (GetPrimaryKeys): ODBC data reader can now
315         properly handle "no-primary-keys" situation. Fixes bug # 82560.
316
317 2007-09-11  Nagappan A  <anagappan@novell.com>
318
319         * OdbcConnectionStringBuilder.cs: Fixed Dsn DisplayName attribute.
320
321 2007-08-13  Nagappan A  <anagappan@novell.com>
322
323         * OdbcMetaDataColumnNames.cs: Added new class.
324
325         * OdbcMetaDataCollectionNames.cs: Added new class.
326
327         * OdbcParameter.cs: 2.0 compatibility changes.
328
329         * OdbcFactory.cs (CreateConnectionStringBuilder)
330         (CreatePermission): Implemented new methods.
331
332         * OdbcInfoMessageEventHandler.cs: 2.0 compatibility changes.
333
334         * OdbcConnection.cs: 2.0 compatibility changes.
335         (GetSchema): Added new overloaded methods.
336
337         * OdbcConnectionStringBuilder.cs (Driver, Dsn): Added attributes
338         as per 2.0 requirement.
339
340         * OdbcDataReader.cs: 2.0 compatibility changes.
341
342         * OdbcCommandBuilder.cs: 2.0 compatibility changes.
343
344         * OdbcCommand.cs: 2.0 compatibility changes.
345
346         * OdbcErrorCollection.cs (CopyTo): Implemented new overloaded
347         method.
348
349         * OdbcException.cs: In 2.0 DbException should be inherited instead
350         of SystemException.
351
352 2007-07-31  Nagappan A  <anagappan@novell.com>
353
354         * OdbcCommand.cs (ExecSQL): Thanks to amc1999@gmail.com (amc) for
355           providing the patch, Fixes bug # 82135. ODBC SQLExecDirect
356           error. Delete where no-data-found fails.
357
358         * OdbcCommandBuilder.cs: Removed bogus TODO.
359           Fixed 2.0 missing attributes
360
361         * libodbc.cs: Added new libodbc global constant SQL_NTS.
362
363         * OdbcCommand.cs (ExecSQL): Thanks to amc1999@gmail.com (amc) for
364           providing the patch, Fixes bug # 82191. ODBC command UTF8
365           error. SQL failed with UTF8 symbols in query.
366           Removed bogus TODO.
367           Fixed 2.0 missing attributes
368
369 2007-07-22  Nagappan A  <anagappan@novell.com>
370
371         * OdbcDataAdapter.cs: Fixed compilation warning.
372
373         * OdbcTransaction.cs: Fixed compilation warning.
374
375 2007-06-30  Gert Driesen  <drieseng@users.sourceforge.net>
376
377         * OdbcDataAdapter.cs: Only override Dispose on 1.0 profile. Added
378         stub for ICloneable.Clone.
379         * OdbcTransaction.cs: Dispose should be explicit interface impl., not
380         public. Connection is also public on 2.0 profile.
381
382 2007-06-21  Nagappan A  <anagappan@novell.com>
383
384         * OdbcConnectionStringBuilder.cs: Added new file with the basic
385         work of Nidhi Rawal (rawalnidhi_rawal@yahoo.com).
386
387         * OdbcDataReader.cs (GetValue): Patch for varchar longer than 255
388         characters, by Mads Bondo Dydensborg <mbd@dbc.dk>.
389
390         * OdbcConnection.cs: Fixed compiler warning.
391
392 2007-06-06  Amit Biswas <amit@amitbiswas.com>
393
394         * OdbcParameter.cs (OdbcParameter ()): Changed default values in the constructor
395         
396         * OdbcParameterCollection.cs (AddRange (Array values)): Implemented missing method
397         (Add): Corrected bug related to default parameter names
398         (Insert): Added check for valid index values
399         (Contains): Corrected bug for case sensitivity
400         (IndexOf): Corrected bug for case sensitivity
401         (IndexOf): Corrected bug in comparing parameter names
402         (Remove): Added check for non existing parameters
403         (AddRange (OdbcParameter): Implemented missing method
404         (AddRange (Array values): Implemented missing method
405         (Insert (int index, OdbcParameter value)): Implemented missing method
406         (Insert (int index, object value)): Implemented missing method
407         (AddWithValue (string parameterName, Object value)): Implemented missing method
408         (Remove (OdbcParameter value)): Implemented missing method
409         (Contains (OdbcParameter value)): Implemented missing method
410         (CopyTo (OdbcParameter [] array, int index)): Implemented missing method
411
412 2007-05-30  Nagappan A  <anagappan@novell.com>
413
414         * OdbcDataReader.cs (GetValue): Adds nano seconds as tickcs from
415         the received buffer.
416
417 2007-05-25  Nagappan A  <anagappan@novell.com>
418
419         * OdbcDataReader.cs (GetValue): Sybase returns the fraction values
420         in nano seconds, but DateTime expects the value in milliseconds,
421         so the conversion.
422
423 2007-05-04  Nagappan A  <anagappan@novell.com>
424
425         * libodbc.cs: Wrong ODBC API definitions (using ints instead of
426         shorts) - Fixes bug 81306. Thanks to will.mooar@tait.co.nz and
427         tausq@debian.org.
428
429         * OdbcDataReader.cs: Wrong ODBC API definitions (using ints
430         instead of shorts) - Fixes bug 81306. Thanks to
431         will.mooar@tait.co.nz and tausq@debian.org.
432
433 2007-02-09  Nagappan A  <anagappan@novell.com>
434
435         * OdbcDataReader.cs (GetDecimal): Implemented new API.
436
437 2007-01-08  Nagappan A  <anagappan@novell.com>
438
439         * OdbcFactory.cs: Fixed compilation warning.
440
441         * OdbcCategoryAttribute.cs (Category): Implemented missing
442         property.
443
444         * OdbcParameterCollection.cs: Fixed compilation warning.
445
446         * OdbcCommandBuilder.cs (GetInsertCommand, GetUpdateCommand)
447         (GetDeleteCommand): Implemented overloaded method.
448
449         * OdbcTransaction.cs: Modified partial content of DOS format file
450         to UNIX format.
451
452 2006-07-13  Senganal T  <tsenganal@novell.com>
453
454         * OdbcTransaction.cs OdbcCommand.cs OdbcConnectionFactory.cs 
455         OdbcPermission.cs OdbcDataReader.cs OdbcParameterCollection.cs 
456         OdbcConnection.cs OdbcFactory.cs OdbcParameter.cs :
457                 2.0 Api fixes
458
459 2006-05-31  Gert Driesen  <drieseng@users.sourceforge.net>
460
461         * OdbcErrorCollection.cs: Removed explicit interface implementation 
462         of IEnumerable.GetEnumerator ().
463         * OdbcCommand.cs: Removed destructor as the destructor in
464         System.ComponentModel.Component already calls the Dispose method.
465         Removed explicit interface implemenation of members that are 
466         implement by public members.
467         * OdbcDataReader.cs: Removed explicit interface implemenation of
468         IDataRecord.GetData.
469
470 2006-05-24  Senganal T <tsenganal@novell.com>
471        
472         * OdbcColumn.cs :
473                 - Added IsVariableSizeType : Handle types with variable datasize
474         * OdbcTypeConverter.cs : map LongVarBinary to Image
475         * OdbcDataReader.cs :
476                 - GetValue () : Handle Text,Image datatypes differently. Only allocate
477                 storage for the data contained and not for MaxLength. Fixes #78234
478
479 2006-05-09  Senganal T  <tsenganal@novell.com>
480
481         * OdbcConnection.cs : Implemented ChangeDatabase Method
482         * libodbc.cs : Added value for CurrentCatalog in OdbcConnectionAttribute 
483
484 2006-02-17  Chris Toshok  <toshok@ximian.com>
485
486         * OdbcDataReader.cs: remove VisibleFieldCount property.
487
488 2005-11-21  Senganal T <tsenganal@novell.com>
489
490         * OdbcTransaction.cs
491         * OdbcCommandBuilder.cs
492         * OdbcParameterCollection.cs
493         * OdbcDataReader.cs
494         * OdbcFactory.cs
495         * OdbcDataAdapter.cs
496         * OdbcParameter.cs
497         
498         Added stubs and other changes for ADO.NET 2.0 compatibility
499
500 2005-10-14  Senganal T <tsenganal@novell.com>
501
502         * OdbcColumn.cs : Changed the mapping of OdbcType.Char to string
503         instead of char. Fixes bug #67269
504
505 2005-10-14  Senganal T <tsenganal@novell.com>
506
507         * OdbcDataReader.cs: Added Text and NText datatypes to the list
508         of datatypes checked by GetValue () method. Fixes bug #75032
509
510 2005-10-14  Sureshkumar T  <tsureshkumar@novell.com>
511
512         * OdbcDataReader.cs (GetValue): Use SQL_CHAR for Numeric as
513         temporary fix.
514
515         * OdbcParameter.cs (CopyValue): Add support for Numeric & Decimal
516         parameters.
517
518 2005-10-08  Sureshkumar T  <tsureshkumar@novell.com>
519
520         * OdbcCommand.cs (BindParameters): Copy the parameter Value after
521         binding.
522
523         * OdbcParameter.cs: re-implemented the native buffer handling and
524         odbc type handling.
525
526         * NativeBuffer.cs: A native buffer class to hold pointer to native
527         memory.
528
529         * OdbcTypeMap.cs (OdbcTypeMap): structure to hold different odbc
530         types and the default mapping.
531
532         * OdbcTypeConverter.cs: Simplified mapping between different odbc
533         types using switch-case.
534
535         * libodbc.cs (SQLBindParameter): use only one entry point and use
536         IntPtr instead of ref.
537
538 2005-08-20  Gert Driesen  <drieseng@users.sourceforge.net>
539
540         * OdbcDataReader.cs: Marked GetPrimaryKeysBySQLStatistics unsafe.
541         This fixes the build on Windows (using csc).
542
543 2005-08-09  Sureshkumar T  <tsureshkumar@novell.com>
544
545         * OdbcDataReader.cs: GetSchemaTable (): set values for the column
546         attributes using SQLColAttribute. If SQLPrimaryKeys does not
547         yeild, try SQLStatistics. Optimized primary key logic.
548
549         * libodbc.cs: Added api SQLStatistics and constants.
550
551         * OdbcParameter.cs: setBuffer (): allocate a short int buffer for
552         OdbcType.SmallInt. fixes bug #75600.
553
554 2005-08-08  Gert Driesen  <drieseng@users.sourceforge.net>
555
556         * OdbcConnection.cs: Marked Init helper method private.
557         * OdbcCommand.cs: Marked BindParameters helper method private.
558
559 2005-08-08  Sureshkumar T  <tsureshkumar@novell.com>
560
561         * OdbcDataReader.cs: Implemented Dispose pattern. Cache
562         schematable for same result set. don't free command's statements
563         if the command is prepared.
564
565         * OdbcConnection.cs: Open (): set disposed to false so that close
566         will be called in Dispose.
567
568         * OdbcCommand.cs:
569         - Prepare (): Split SQLPrepare and SQLBind so that
570         already prepared statements can be reused with new parameter
571         values.
572         - ExecSQL (): create new statement handle, if not prepared
573         and there are no parameters. if there are parameters, prepare and
574         use.
575         - Implemented Dispose pattern
576         - Streamlined the allocation and de-allocation of statement
577         handles.
578
579 2005-08-05  Sureshkumar T  <tsureshkumar@novell.com>
580
581         * OdbcDataReader.cs: RecordsAffected: get value from command.
582         GetSchemaTable (): set IsExpression based on BaseTableName. set
583         AllowDBNull to false if the column is PK.
584
585         * OdbcCommand.cs: correct UpdatedRowSource is returned. whitespace
586         changes to conform to standard.
587
588         * OdbcCommandBuilder.cs: Implemented.
589
590         * OdbcParameter.cs: Direction is set to Input by default.
591
592 2005-07-22  Sureshkumar T  <tsureshkumar@novell.com>
593
594         * OdbcParameter.cs: updated attributes & attribute descriptions to
595         match with masterinfos.
596
597         * OdbcDataReader.cs: NextRow (): made private.
598
599 2005-07-21  Sureshkumar T  <tsureshkumar@novell.com>
600
601         * OdbcDataReader.cs: GetValue (): added case for OdbcType.Bit. and
602         Formatting corrections. Fixes bug #75574.
603
604 2005-07-07  Sureshkumar T  <tsureshkumar@novell.com>
605
606         * OdbcTypeConverter.cs: ConvertToSqlType & ConvertToSqlCType: map
607         VarChar to SQL_C_CHAR and SQL_VARCHAR respective instead of WCHAR
608         and WVARCHAR as temporary fix.
609
610         * OdbcParameter.cs: setBuffer: string types need not be quoted.
611
612 2005-06-28  Sureshkumar T  <tsureshkumar@novell.com>
613
614         * OdbcDataReader.cs: GetPrimaryKeys (): use the length indicator
615         for GetString, otherwise, it creates a string of length 255. Use
616         ArrayList for keys as the columns are different from the selected
617         columns. fixes bug #75263.
618
619 2005-06-09  Sureshkumar T  <tsureshkumar@novell.com>
620
621         * OdbcDataReader.cs: GetValue (): return decimal in case of odbc
622         type Numeric. Move the temp buffer logic inside.
623
624         * OdbcTypeConverter.cs: map SQL_TYPE.NUMERIC to SQL_C_TYPE.CHAR by
625         now, since PgSql driver seems not to accept NUMERIC c type. Other
626         database anyway, provides NUMERIC datatype as DECIMAL.
627
628 2005-05-31  Sureshkumar T  <tsureshkumar@novell.com>
629
630         * OdbcParameter.cs: setBuffer (): for numeric type, the buffer
631         parameter should be a packed decimal struct. fixes bug #75041.
632
633 2005-04-05  Sureshkumar T  <tsureshkumar@novell.com>
634
635         * OdbcParameter.cs: SqlBindParameter requires the last parameter
636         to be a ref.
637         * libodbc.cs: API change for above.
638
639 2005-04-04  Sureshkumar T  <tsureshkumar@novell.com>
640
641         * OdbcDataReader.cs: Ignore BaseTableName & BaseColumnName
642         properties while building Schema information as most drivers
643         ignores these properties. e.g. PostgreSQL.
644
645 2005-03-24  Sureshkumar T  <tsureshkumar@novell.com>
646             Appasamy <appasamy@rediffmail.com>
647
648         * OdbcColumn.cs: IsStringType: OdbcType.Char is also of type
649         String.
650         * OdbcDataReader.cs: GetSchemaTable: Get Additional info using
651         SQLColAttribute. Don't pad with spaces in GetColAttributeStr.
652
653 2005-03-24  Sureshkumar T  <tsureshkumar@novell.com>
654
655         * OdbcDataReader.cs:
656         - GetValue: Decode only outsize length for SQL_C_TYPE.CHAR type in
657         SQLGetData.
658         - GetOrdinal: Perform case insensitive lookup if sensitive lookup
659         fails.
660
661 2005-03-22  Sureshkumar T  <tsureshkumar@novell.com>
662             Appsamy <appasamy@rediffmail.com>
663
664         * libodbc.cs (System.Data.Odbc): Added enum FieldIdentifier. Added
665         library functions SQLPrimaryKeys, SQLBindCol and SQLColAttribute.
666
667         * OdbcDataReader.cs: Implemented GetPrimaryKeys to get the primary
668         keys associated with resultset using SQLPrimaryKeys.
669
670 2005-03-15  Sureshkumar T  <tsureshkumar@novell.com>
671
672         * OdbcConnection.cs: re-throw error on exception in Open method.
673
674 2005-03-11  Sureshkumar T  <tsureshkumar@novell.com>
675
676         * OdbcConnection.cs : notify state change through event. clean up
677         handles in case any exception while opening a connection. NET_2_0
678         uses base class's OnStateChange handler.
679
680 2005-03-10  Sureshkumar T  <tsureshkumar@novell.com>
681
682         Migrated core classes to derive from ProviderBase instead of
683         implementing IDb* interfaces. Most part of these files have been
684         branched with #if NET_2_0/ONLY_1_1. Make sure any changes works
685         with both the profiles.
686
687         * OdbcFactory.cs: Concrete Factory for DbProviderFactory. Factory
688         to generate Connection,Command,etc.
689
690         * OdbcConnectionFactory.cs: Concrete factory for DbConnectionFactory.
691
692         * OdbcTransaction.cs: migration and overrides.
693         * OdbcCommandBuilder.cs: migration and overrides.
694         * OdbcDataReader.cs: --do--. no command behavior member as it will
695         be maintained in base provider class.
696         * OdbcParameterCollection.cs: --do--. Now, local ArrayList is not
697         maintained here, instead it is in base class. Most of the methods
698         which operated on this list are not needed in NET_2_0.
699         * OdbcConnection.cs: Migration. connectionString is maintained in
700         DbConnectionBase class.
701         * OdbcParameter.cs: Migration. Many of the local members like
702         value,sourceColumn are maintained in DbParameterBase.
703         * OdbcCommand.cs: Migration. commandText,timeout and
704         commandTimeOut are maintained in DbCommandBase class.
705
706 2005-03-10  Sureshkumar T  <tsureshkumar@novell.com>
707
708         * OdbcType.cs: Added enums for SQL_TYPE & SQL_C_TYPE.
709         
710         * libodbc.cs: Accept SQL_C_TYPE for driver
711         parameters. SQLBindParameter takes two parameters SQL_TYPE and
712         SQL_C_TYPE. This caused the whole lot of changes done in this
713         revision.
714         
715         * OdbcParameter.cs: Set default values of OdbcType & DbType. Pass
716         mapped SQL_TYPE and SQL_C_TYPE to SQLBindParameter. Increase
717         buffer size by 2 for additional ' chars.
718         
719         * OdbcTypeConverter.cs: Added class to convert between OdbcType,
720         SQL_TYPE, SQL_C_TYPE.
721         
722         * OdbcColumn.cs: Added private members for SQL_TYPE and
723         SQL_C_TYPE. conversion from/to odbctype to/from SQL_TYPE is done
724         through OdbcTypeConverter class.
725         
726         * OdbcDataReader.cs: use OdbcColumn's SQL_C_TYPE member. It keeps
727         track of default mapping between odbctype, SQL_TYPE and
728         SQL_C_TYPE. Move dataTableSchema.AcceptChanges inside if condition
729         to avoid null reference exception.
730
731 2005-02-04  Sureshkumar T  <tsureshkumar@novell.com>
732             Appasamy <appasamy@rediffmail.com>
733
734         * OdbcConnection.cs: Implemented properties database, datasource,
735         serverversion and driver.
736         * libodbc.cs: Added type OdbcInfo and native call SQLGetInfo.
737
738 2005-01-20  Sureshkumar T  <tsureshkumar@novell.com>
739
740         * OdbcDataReader.cs: case for type OdbcType.Double added in
741         GetValue.  fixes bug #71173.
742
743         Thanks to patch given by "Appasamy T" <appasamy@rediffmail.com>
744
745 2005-01-19  Sureshkumar T  <tsureshkumar@novell.com>
746
747         * OdbcType.cs: Change enum values for compatiability with MS.NET.
748         * libodbc.cs: Change enum values for compatiability with
749         MS.NET. Change calls into driver with native type.
750         * OdbcDataReader.cs: Change enum values for compatiability with
751         MS.NET. Change calls from/into driver with native type.
752
753 2005-01-18  Sureshkumar T  <tsureshkumar@novell.com>
754
755         * OdbcDataReader.cs: GetOrdinal need not check for
756         currentRow. Return -1 if column name is not found.
757
758         fixes bug #71261. Thanks to patch given by "Appasamy T"
759         <appasamy@rediffmail.com>.
760
761 2005-01-13  Sureshkumar T  <tsureshkumar@novell.com>
762
763         * OdbcDataReader.cs: Implement NextResultSet for multiple result
764         set queries. 
765         
766         * OdbcDataReader.cs: build column schema once creating reader and
767         then for each Next result set. Thanks to
768         sebastien.robitaille@croesus.com (Sebastien Robitaille) for
769         pointing out this optimization (bugzilla #70530).
770
771         * libodbc.cs: Added library calls SQLFreeStmt and SQLMoreResults
772         for mutiple resultsets.
773
774 2005-01-10  Sureshkumar T  <tsureshkumar@novell.com>
775
776         * OdbcDataReader.cs: Connection has to be closed only after
777         Statement handle is freed. fixes bug #70048.
778
779 2005-01-07  Sureshkumar T  <tsureshkumar@novell.com>
780
781         * OdbcDataReader.cs: Pass OdbcCType.SignedBigInt for accessing big
782         int columns.
783
784         * OdbcType.cs: Added a new enum for Odbc C DataTypes. This should
785         essentially be passed to drivers, since the public OdbcType types
786         differs from types expected in drivers in some cases.
787
788         * libodbc.cs : Added a ODBC method which takes OdbcCType
789         enumeration for SQLGetData for BigInt fields.
790
791         fixes bug #65342.
792
793 2004-12-28  Duncan Mak  <duncan@ximian.com>
794
795         * libodbc.cs: Change all the DllImport attributes to point to
796         "odbc32.dll" instead of "odbc32", because /etc/mono/config lists
797         "odbc32.dll" (all other entries in the file have the .dll suffix
798         as well, for consistency's sake, let's rename it here.)
799
800         This fixes #70727.
801         
802 2004-12-03  Sureshkumar T  <tsureshkumar@novell.com>
803
804         * OdbcParameter.cs: Fixed a null reference exception when a
805         parameter is created and its value is not set. #68750.
806
807 2004-11-26  Sureshkumar T  <tsureshkumar@novell.com>
808
809         * OdbcParameter.cs: Fixed Parameter Size property as well as
810         insufficient buffer errors. bug #68749.
811
812 2004-09-14  Sebastien Pouliot  <sebastien@ximian.com>
813
814         * OdbcPermission.cs: Added internal constructor accepting an Odbc
815         PermissionAttribute parameter (using base class protected ctor).
816         * OdbcPermissionAttribute.cs: Copy now use the new OdbcPermission
817         constructor.
818
819 2004-09-13  Sebastien Pouliot  <sebastien@ximian.com>
820
821         * OdbcPermission.cs: Mostly completed (needs tests).
822         * OdbcPermissionAttribute.cs: Completed.
823
824 2004-08-31 Umadevi S (sumadevi@novell.com)
825         * OdbcDataReader.cs - Fixed Decimal parsing
826
827 2004-08-30 Umadevi S (sumadevi@novell.com)
828         * OdbcType.cs - removed inheritance from short.
829
830 2004-08-27 Sureshkumar T (tsureshkumar@novell.com)
831         * OdbcDataReader.cs - fixed bug #63539 - TINYINT ODBC datatype is converted into System.Byte
832
833 2004-08-26 Sureshkumar T (tsureshkumar@novell.com)
834         * OdbcDataReader.cs - Date & DateTime GetValue fixed. 
835                               GetBytes ordinal parameter passing fixed for BINARY in GetValue.
836
837 2004-08-20 Sureshkumar T (tsureshkumar@novell.com)
838         * OdbcConnection.cs - correct handles are passed to OdbcError exception to trap the correct error
839
840 2004-08-04 Umadevi S (sumadevi@novell.com)
841         * OdbcDataReader.cs - Fixed bug 61832 - Column names were not filled, due to which name based lookup of columns failed.
842                                                                                                   
843
844 2004-08-04 Umadevi S (sumadevi@novell.com)
845         * OdbcDataReader.cs - Fixed bug 61405 - Handling smallint column type.
846
847 2004-07-30  Sureshkumar T (tsureshkumar@novell.com)
848         * OdbcCommand.cs: ExecuteNonQuery Closed statement handle to fix memory leak
849         * OdbcDataReader.cs: Closed statement handle to fix memory leak
850                              Removed SQLState login in GetBytes coz OdbcError provides the same.
851                                     
852 2004-07-29 Umadevi S (sumadevi@novell.com)
853         * OdbcCommand.cs - Fixed bug 62046. ExecuteNonQuery implemented correctly
854                                                                                                     
855
856 2004-07-28 Umadevi S (sumadevi@novell.com)
857         * OdbcParameter.cs - fixed bug 61968. String values passed with quotes
858                                                                                                  
859
860 2004-07-07 Umadevi S (sumadevi@novell.com)
861         * OdbcConnection.cs - Allowed Close to be called multiple times
862                             - Implementation of Dispose method
863
864 2004-07-07 Umadevi S (sumadevi@novell.com)
865         * OdbcCommand.cs : fixed set method for Transaction
866                                                           
867 2004-07-01  Sureshkumar T (tsureshkumar@novell.com)
868         * OdbcCommand.cs   : fixed reader problem with ExecuteScalar
869
870 2004-06-23  Sureshkumar T (tsureshkumar@novell.com)
871         * OdbcConnection.cs: Fix: Moved env allocation to Open method. 
872                              Disconnection & freeing handles are done in Close 
873                              method to avoid simultaneous connections.
874         * libodbc.cs       : Added constants for odbc version.
875                                     
876 2004-06-16  Gert Driesen <drieseng@users.sourceforge.net>
877
878         * OdbcError.cs: fixed serialization compatibility with MS.NET
879         * OdbcErrorCollection.cs: fixed serialization compatibility with
880         MS.NET
881         * OdbcException.cs: fixed serialization compatibility with MS.NET
882
883 2004-06-16  Sureshkumar T (tsureshkumar@novell.com)
884         * OdbcDataReader.cs: Added GetValue support for Sql Binary type to return byte array.
885                              Implemented GetBytes method.
886         * libodbc.cs       : Added enums, constants & imports for above fix.
887
888 2004-06-13  Gert Driesen <drieseng@users.sourceforge.net>
889
890         * OdbcDataReader.cs: changed GetData method to return IDataReader
891         to match MS.NET
892
893 2004-06-09  Sureshkumar T (tsureshkumar@novell.com)
894         * OdbcDataReader.cs: Removed checking of currentRow in GetName
895           method
896
897 2004-06-04  Gert Driesen <drieseng@users.sourceforge.net>
898
899         * OdbcPermission.cs: moved Obsolete attribute to correct
900         ctor
901
902 2004-06-02  Sureshkumar T (tsureshkumar@novell.com)
903        
904         * OdbcDataReader.cs: Implemented GetByte method. Fixed bug #58820
905
906 2004-06-02  Gert Driesen <drieseng@users.sourceforge.net>
907
908         * OdbcParameter.cs: added missing attributes
909         * OdbcPermission.cs: added missing attributes
910         * OdbcConnection.cs: fixes attribute, added missing attributes
911         * OdbcInfoMessageEventArgs.cs: removed extra properties, fixed
912         API compatibility with MS.NET
913         * OdbcCommandBuilder.cs: use correct attributes
914
915 2004-05-20  Gert Driesen (drieseng@users.sourceforge.net)
916
917         *  OdbcPermissionAttribute.cs: change AllowMultiple and
918         Inherited to match .NET
919
920 2004-05-17 Umadevi S (sumadevi@novell.com)
921         * OdbcPermissionAttribute, OdbcPermission.cs - fixed missing methods
922
923 2004-05-17 Gert Driesen (drieseng@users.sourceforge.net)
924         * OdbcCategoryAttribute.cs: fixed namespace
925         * OdbcDataAdapter.cs: removed extra attributes
926         * OdbcDescriptionAttribute.cs: fixed namespace
927
928 2004-05-14 Umadevi S (sumadevi@novell.com)
929         * OdbcParameterConverter.cs -Added 
930         * OdbcParameter.cs - Added some attributes      
931
932 2004-05-14 Umadevi S (sumadevi@novell.com)
933         * OdbcDataAdapter.cs - Added Attributes
934
935 2004-05-14 Umadevi S (sumadevi@novell.com)
936         * OdbcConnection.cs - Added Attributes
937
938 2004-05-14 Umadevi S (sumadevi@novell.com)
939         * OdbcCommand.cs - Added Attributes
940
941 2004-05-14 Umadevi S (sumadevi@novell.com)
942         * OdbcDataReader.cs - Added Attributes
943
944 2004-05-14 Umadevi S (sumadevi@novell.com)
945         * Added Classes OdbcCategoryAttribute.cs, OdbcDescriptionAttribute.cs
946
947 2004-05-14 Umadevi S (sumadevi@novell.com)
948         * Added Class OdbcCommandBuilder.cs
949
950 2004-05-14 Umadevi S (sumadevi@novell.com)
951         * Added classes OdbcInfoMessageEventArgs.cs - with stubs
952         * Added classes OdbcInfoMessageEventInfo.cs     
953
954 2004-05-14 Umadevi S (sumadevi@novell.com)
955         * Added classes OdbcPermission.cs, OdbcPermissionAttribute.cs - with stubs
956
957 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
958         * OdbcException.cs : removed ErrorCode property, fixing signature
959         * OdbcErrorCollection.cs : added internal ctor, reduced 
960         accessibility of Add method to internal
961         * OdbcCommand.cs: marked hstmt field private, remove setters for
962         Parameters property
963         * OdbcDataReader.cs: Added GetDate method, renamed GetTimeSpan to
964         GetTime to match MS.NET, added HasRows stub
965
966 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
967         * OdbcError.cs: 
968         * OdbcErrorCollection.cs:
969         * OdbcException.cs: fixed linefeeds to DOS to match other
970         sources in System.Data.Odbc
971
972 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
973         * OdbcCommand.cs: No longer use OdbcConnection.Datareader, in order 
974         to fix signature of OdbcConnection
975         * OdbcDataReader.cs: No longer use ODbcConnection.Datareader, in 
976         order to fix signature of OdbcConnection
977         * OdbcConnection.cs: Signature fixes: removed DataReader property, 
978         added setter for ConnectionTimeout, made transaction internal
979         * OdbcParameter.cs: reduced accessibility of Bind method to 
980         internal, added setter for IsNullable
981         * OdbcParameterCollection.cs: made default ctor and Bind method
982         internal
983
984 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
985         * OdbcCommand.cs: fixed linefeeds to DOS to match other sources
986         in System.Data.Odbc
987
988 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
989         * OdbcTransaction.cs: fixed signature to match MS.NET
990
991 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
992         * OdbcType.cs: fixed typo UniqueIndetifier
993         * OdbcColumn.cs : fixed typo UniqueIndetifier
994
995 2004-05-09  Gert Driesen (drieseng@users.sourceforge.net)
996         * OdbcType.cs: fixed linefeeds to DOS to match other sources
997         in System.Data.Odbc
998
999 2003-12-01  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1000
1001         * OdbcTransaction.cs: applied patch from Jeff Seifert that makes
1002         this class implement IDbTransaction interface.
1003
1004 2002-11-01  Daniel Morgan <danmorg@sc.rr.com>
1005
1006         * OdbcDataReader.cs: - uncommented code, but I put a FIXME:
1007         according to Brian, this does not work on MS .NET however, we need it
1008         for Mono for now. schemaRow.AcceptChanges(),
1009         - implement IEnumerable.GetEnumerator()
1010     
1011         * libodbc.cs: changed the DllImport from "odbc32.dll" to "odbc32"
1012     
1013 2002-10-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
1014
1015         * ChangeLog: added.
1016         * OdbcError.cs:
1017         * OdbcException.cs: added dummy implementation for these missing
1018         classes.
1019