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