2010-06-15 Jonathan Chambers <joncham@gmail.com>
[mono.git] / mcs / class / Mono.Data.Tds / Mono.Data.Tds.Protocol / ChangeLog
1 2010-06-15 Jonathan Chambers  <joncham@gmail.com>
2
3         * Tds.cs: Add {} around default switch case.
4
5 2010-06-15  Veerapuram Varadhan  <vvaradhan@novell.com>
6
7         ** Fixes #613087
8         * Tds.cs (ProcessLoginAck): Fix server version being compared in 
9         the switch-case.
10         * Tds70.cs (BuildPreparedParameters, BuildProcedureCall): Set default 
11         precision to 18 as used by MS.Net when connecting to SqlServer 7.0.
12         (BuildExec, ExecRPC): Marked protected in order to be used by Tds80 
13         and henceforth.
14         * Tds80.cs (Execute): Separated from Tds70 to include Tds80 changes.
15         
16 2010-04-21  Veerapuram Varadhan  <vvaradhan@novell.com>
17
18         ** Fixes #595918
19         * Tds70.cs (WriteParameterInfo): Write updated decimal value according 
20         to specified scale value.
21         
22 2009-08-17  Veerapuram Varadhan  <vvaradhan@novell.com>
23
24         ** Fixes #381151 NRE 
25         * Tds.cs (ProcessColumnInfo): Use Columns instead of creating a new list.
26         * TdsDataColumnCollection.cs (Clear, Add): New utility methods 
27         * Tdsxx.cs: ProcessColumnInfo definition changes.
28         
29 2009-07-25  Veerapuram Varadhan  <vvaradhan@novell.com>
30
31         * Tds70.cs (ProcessColumnInfo): Update the new DataTypeName property.
32         * TdsDataColumn.cs: Added DataTypeName property accessors.
33         
34 2009-07-25  Gert Driesen  <drieseng@users.sourceforge.net>
35
36         * TdsConnectionPool.cs: Fixed typo in ResetConnectionPool.
37
38 2009-05-26  Veerapuram Varadhan  <vvaradhan@novell.com>
39
40         ** Fixes #382734
41         * Tds80.cs: Consider queries with Parameters as RPCs and avoid formatting 
42         param values as strings.  Fixes issues with locale specific string 
43         formatting/conversions.
44         
45         * TdsRpcProcId.cs: New - enum of rpc Ids to use with RPC packet type.
46         
47 2009-05-16  Veerapuram Varadhan  <vvaradhan@novell.com>
48
49         * Tds70.cs (WriteParameterInfo): Default precision is 29 and not 28.
50         
51 2009-05-16  Veerapuram Varadhan  <vvaradhan@novell.com>
52
53         * Tds70.cs (WriteParameterInfo): Do not change the original 
54         param.TypeName value.
55         
56 2009-05-16  Veerapuram Varadhan  <vvaradhan@novell.com>
57
58         ** Fixes #382589
59         * Tds.cs (ServerTdsVersion): New property to access ServerVersion.
60         
61         * Tds70.cs (WriteParameterInfo): Treat Decimal types as Numeric 
62         types from SQL Server 2000.
63         
64         * TdsVersion.cs: Add SQL Server 2008 version.
65         
66 2009-05-02  Veerapuram Varadhan  <vvaradhan@novell.com>
67
68         ** Fixes #462947 - Patch by Gert Driesen
69         * Tds.cs (InitExec): More intialization of variables. 
70         
71 2009-04-28  Veerapuram Varadhan  <vvaradhan@novell.com>
72
73         * Tds.cs (InitExec):  Move initialization of SequentialAccess related 
74         variables here.
75         
76 2009-04-28  Veerapuram Varadhan  <vvaradhan@novell.com>
77         
78         * Tds.cs (ExecuteQuery): Reset all the variables related to LoadData 
79         when performing queries with SequentialAccess set to true.  Fixes 
80         incorrect handling of data retrieval when multiple queries are run 
81         with SequentialAccess set to true for the same instance of Tds.
82         
83 2009-04-28  Veerapuram Varadhan  <vvaradhan@novell.com>
84
85         * Tds.cs (ExecuteQuery): Reset SequentialAccess read state variables 
86         in order to avoid blocking forever when two queries are executed with 
87         SequentialAccess set to true for the same instance of Tds.
88         
89 2009-04-28  Veerapuram Varadhan  <vvaradhan@novell.com>
90
91         ** Fixes#463011
92         * Tds70.cs (Reset): Call base.Reset to update Database being used.
93
94 2009-04-28 Gonzalo Paniagua Javier <gonzalo@novell.com>
95
96         * TdsConnectionPool.cs: if GetConnection() fails to create a
97         connection, try again several times and then throw. Improved
98         ResetConnectionPool() so that it does not immediately close
99         connections in use. Don't re-add connections that have been closed.
100
101         * Tds.cs: Connected tests the socket connection too. Made Disconnect()
102         not throw.
103
104         * TdsComm.cs: set more socket options (timeout and NoDelay) and have a
105         single entry point for reading from the stream.
106
107 2009-03-23  Veerapuram Varadhan  <vvaradhan@novell.com>
108
109         * Tds.cs: Properly handle TdsColumnType.BigInt as we support TDS 8 now.
110         
111 2009-03-15  Veerapuram Varadhan  <vvaradhan@novell.com>
112
113         ** Fixes #463011
114         * Tds70.cs (Reset): Call base.Reset to update Database being used.
115         
116 2009-03-14  Veerapuram Varadhan  <vvaradhan@novell.com>
117
118         * Tds70.cs (WriteParameterInfo): Handle scenarios of Partlentype, 
119         a TDS 9 feature.
120         
121 2009-03-04  Veerapuram Varadhan  <vvaradhan@novell.com>
122
123         * TdsComm.cs (Append (*)): Do not create temporary byte arrays, 
124         instead manipulate directly. Saves quite a bit of allocations 
125         and improves performance.
126         (AppendInternal) : Do the math here.
127         (TdsByteOrder) : Property that indicates the byte-order-encoding which, 
128         is independent of host's byte-order-encoding.
129         (SendPhysicalPacket): Add packet-id to the header
130         
131 2009-02-26  Veerapuram Varadhan  <vvaradhan@novell.com>
132
133         * Tds.cs (ProcessLoginAck): Set TdsVersion to the version
134         supported by the server.
135         (GetColumnValue): lcid and sortId are available only from Tds 8.
136
137         * Tds80.cs (ProcessColumnInfo, ProcessOutputParam): Call base
138         methods if the server version is less than Tds 8.
139         
140 2009-02-19  Veerapuram Varadhan  <vvaradhan@novell.com>
141
142         * Tds.cs: Tds 8 collation support
143           Tds80.cs: - ditto -
144           TdsComm.cs: - ditto -
145           TdsDataColumn.cs: - ditto -
146           TdsCollation.cs: New file. Based on patch from Dmitry S. Kataev  
147           <dmitryskey@hotmail.com>
148           
149 2009-02-02  Veerapuram Varadhan  <vvaradhan@novell.com>
150
151         * Tds.cs:       TDS 8 changes
152           Tds70.cs: - ditto -
153           Tds80.cs: - ditto -
154           TdsVersion.cs: - ditto -
155           TdsEnvPacketSubType.cs: - ditto -
156           TdsComm.cs:   - ditto -
157           
158 2009-01-29 Gonzalo Paniagua Javier <gonzalo@novell.com>
159
160         * Tds70.cs: fix for output parameters and '@'.
161         Fixes bug #470579. Patch from Varadhan.
162
163 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
164
165         * TdsConnectionPool.cs: made getting/releasing connections thread safe.
166         If we have a release connection available, we return that without locking
167
168 2009-01-21 Christian Hergert <christian.hergert@gmail.com>
169
170         * TdsComm.cs: optimize Append(byte[],int,byte) for adding data to
171         the buffer in the largest size of chunks possible.  also optimize
172         other Append overloads to use this rather than lots of Append(byte).
173
174 2009-01-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
175
176         * TdsComm.cs: no need for the ManualResetEvent or the timeout instance
177         variables.
178
179 2009-01-14 Gonzalo Paniagua Javier <gonzalo@novell.com>
180
181         * Tds70.cs: fix my mistake in the previous patch.
182
183 2009-01-14 Gonzalo Paniagua Javier <gonzalo@novell.com>
184
185         * Tds70.cs: more '@' handling.
186
187 2009-01-14 Gonzalo Paniagua Javier <gonzalo@novell.com>
188
189         * Tds70.cs: send the leading '@' for parameters that do not have one.
190         Fixes bug #466071.
191         Thanks to William Shallum.
192
193 2009-01-04  Gert Driesen  <drieseng@users.sourceforge.net>
194
195         * Tds.cs: Support detecting NULL value when sequentially reading
196         text/ntext/image column. Fixed typo in exception message in
197         GetSequentialColumnValue. Support reading zero-length binary data.
198
199 2008-12-30  Gert Driesen  <drieseng@users.sourceforge.net>
200
201         * Tds.cs: Added IsWideType method.
202         * Tds70.cs: Fixed columnsize for unicode columns. Set precision
203         and scale for non-decimal/numeric column.
204         * TdsColumnType.cs: Adds tds names as comment.
205
206 2008-12-30  Gert Driesen  <drieseng@users.sourceforge.net>
207
208         * Tds.cs (LoadData): Improve exception message when attempting to
209         read before the current position. Update the remaining length of the
210         stream when skipping bytes.
211
212 2008-12-05 Gonzalo Paniagua Javier <gonzalo@novell.com>
213
214         * Tds70.cs: support parameter names with or without a leading '@'.
215
216 2008-11-13  Veerapuram Varadhan  <vvaradhan@novell.com>
217
218         * TdsComm.cs (ResetConnection, IsConnected): Added a property and
219         method.  IsConnected will check for any connection-reset occurrance
220         from other end-point of the underlying socket.  ResetConnection
221         adds the "reset" bit in the Status flag field of packet header.
222         Set socket option to keep alive, whereever supported and also, let
223         the socket close along with the underlying stream.
224
225         * Tds70.cs (Reset): Use the new ResetConnection property instead
226         of executing sp_reset_connection.  Saves a round-trip.
227         
228 2008-11-11  Gert Driesen  <drieseng@users.sourceforge.net>
229
230         * Tds70.cs: Support writing negative (small)money values. Added 
231         overflow check for smallmoney values. Fixes bug #428139.
232         * Tds.cs: Fixed reading negative (small)money values.
233
234 2008-11-09  Gert Driesen  <drieseng@users.sourceforge.net>
235
236         * TdsConnectionPool.cs: Added TdsConnectionPoolManager.GetConnection
237         overload that can be used to retrieve an existing connection pool.
238         Modified ResetConnectionPool () to skip free slots in the pool and to
239         close pooled connections that are not in use. Pooled connections that
240         are in use are now marked as non-pooled so that they are no longer
241         returned to the pool when they are closed. Fixes bug #443131.
242
243 2008-09-16  Veerapuram Varadhan  <vvaradhan@novell.com>
244
245         Patch from Christian Hergert <christian.hergert@gmail.com>
246         * TdsComm.cs: Expose the stream to be internally used by other
247         classes
248         * Tds70.cs (Reset): Validate whether the connection is available
249         or not.
250         
251 2008-07-09  Veerapuram Varadhan  <vvaradhan@novell.com>
252
253         * TdsComm.cs:  Cleanup stray Console.WriteLine that got in during last commit
254         
255 2008-07-09  Veerapuram Varadhan  <vvaradhan@novell.com>
256
257         Patch by Jon Larimer <jlarimer@gmail.com> fixes ##407208
258         * TdsComm.cs: Call DNS.GetHostEntry() only for host names and not for IPs.
259         
260 2008-07-06  Gert Driesen  <drieseng@users.sourceforge.net>
261
262         * TdsConnectionPool.cs: When pooled connection cannot be reset, remove
263         it from pool and allow slot to be re-used for a newly established
264         connection. Fixes part of bug #360157. When pool is full, and no
265         connection becomes available before the connect timeout has elapsed,
266         then throw an InvalidOperationException instead of a SqlException.
267         * Tds50.cs: Fixed compiler warning. Removed extra tabs, and changed
268         spaces to tabs. Minor code formatting.
269         * Tds70.cs: Removed extra tabs, and changed spaces to tabs. Code
270         formatting. Avoid calling Environment.UserDomainName if username
271         contains domain. Use String.Empty instead of "".
272         * TdsConnectionParameters.cs: Invoke Reset method for initializing
273         fields. Spaces to tabs.
274
275 2008-07-04  Gert Driesen  <drieseng@users.sourceforge.net>
276
277         * TdsConnectionPool.cs: On 1.0 profile, use object[] for list of
278         connections. Patch provided by Christian Hergert. Fixes bug #406540.
279
280 2008-07-04  Gert Driesen  <drieseng@users.sourceforge.net>
281
282         * Tds.cs: Avoid accessing TdsDataColumnCollection indexer. On 2.0
283         profile, use predefined properties on TdsDataColumn for setting the
284         BaseColumnName and BaseTableName. Fixes bug #406556.
285         * Tds50.cs: Avoid accessing TdsDataColumnCollection indexer, and
286         fixed IsHidden.
287
288 2008-07-01  Gert Driesen  <drieseng@users.sourceforge.net>
289
290         * Tds70.cs: Avoid accessing TdsDataColumnCollection indexer.
291         * Tds.cs: Removed unused method.
292         * TdsComm.cs: Fixed compiler warning.
293
294 2008-07-01  Marek Habersack  <mhabersack@novell.com>
295
296         * TdsDataColumnCollection.cs, Tds50.cs, Tds42.cs, Tds70.cs,
297         Tds.cs: adjust for changes below.
298
299         * TdsDataColumn.cs: use the named properties only in the 2.0
300         profile. The reason is that Mono.Data.TdsClient.TdsDataReader
301         needs to know if a property has been set or not. With 2.0 it is
302         easy to implement using nullable types, with 1.x it would require
303         using e.g. BitArray to control which field was set, and in
304         addition extra code would be needed to check whether a field was
305         set or not. Also, it would clutter the code with #ifdefs all over
306         the map.
307
308 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
309
310         * TdsDataColumn.cs: Do not inherit from Hashtable, add always set properties
311         as normal properties so code can access them without doing a hashtable lookup.
312
313         * Tds.cs Tds42.cs Tds50.cs Tds70.cs: Adapt to the TdsDataColumn changes.
314
315 2008-06-09  Veerapuram Varadhan  <vvaradhan@novell.com>
316
317         Patch from Christian Hergert <christian.hergert@gmail.com>
318         * TdsConnectionPool.cs: Remove unnecessary locks and code refactoring 
319         * Tds.cs: Add member to hold status of the connection pool  
320         
321 2008-06-09  Ankit Jain  <jankit@novell.com>
322
323         Tds class doesn't need to inherit Component or implement ITds, fix.
324         * Tds.cs: Update
325         * Tds42.cs, Tds50.cs, Tds70.cs, Tds80.cs:
326         Make Tds-derived classes sealed.
327         * TdsConnectionPool.cs: Update.
328
329 2008-05-17  Gert Driesen  <drieseng@users.sourceforge.net>
330
331         * Tds.cs: Do not return 0 for decimal/numeric columns with value NULL.
332         Avoid unnecessary initialization of fields, and minor code formatting.
333
334 2008-05-15  Marek Habersack  <mhabersack@novell.com>
335
336         * Tds.cs: deal with null columns when getting value for a Numeric
337         or Decimal columns.
338
339 2008-05-05  Gonzalo Paniagua Javier <gonzalo.mono@gmail.com>
340
341         * Tds.cs: a numeric column with no decimal digits and a precision <= 80
342         is translated into a long.
343
344 2007-11-10  Gert Driesen  <drieseng@users.sourceforge.net>
345
346         * Tds.cs: Round milliseconds for datetime. Fixes part of bug #323646.
347         * Tds70.cs: Include milliseconds for datetime parameters. Fixes part
348         of bug #323646.
349
350 2007-10-17  Nagappan <anagappan@novell.com> 
351
352         * TdsConnectionPool.cs: Default the pooling is enabled. It has to be
353           disabled only when we clear all the pools.
354
355 2007-09-25  Nagappan A  <anagappan@novell.com>
356
357         * Tds.cs (Pooling): Added new property to get the internal
358         connection pooling list.
359
360         * ITds.cs (Pooling): Added new property to get the internal
361         connection pooling list.
362
363         * TdsConnectionPool.cs (ResetConnectionPool, GetConnectionPool)
364         (ReleaseConnection): Added new methods to clear connection pool.
365
366 2007-08-06  Nagappan A  <anagappan@novell.com>
367
368         * TdsComm.cs (TdsComm): Now connects to the SqlServer in Async
369         mode. Fixes bug # 81934.
370
371         * Tds.cs (ProcessEnvironmentChange): Gets the server locale to use
372         them when required. Fixes bug # 82047.
373         When the server resets the connection, now the client code also
374         disconnects the session and remove the instance. Fixes bug #
375         81933.
376         Added new protected property Locale.
377
378         * TdsEnvPacketSubType.cs (Locale): Added new enumerator
379         entry. This gets the Locale type of SqlServer. Fixes bug # 82047.
380
381         * Tds70.cs (FormatParameter): Fixes the error when trying to add a
382         row with a DateTime field into an Italian SqlServer, bug # 82047.
383
384 2007-07-23  Nagappan A  <anagappan@novell.com>
385
386         * TdsBulkCopy.cs: Removed all the Namespace that are not
387         required.
388
389 2007-07-22  Nagappan A  <anagappan@novell.com>
390
391         * TdsBulkCopy.cs: Added new file to handle the bulk copy
392         operation.
393
394         * Tds.cs (ExecBulkCopyMetaData, ExecBulkCopy): Added new methods
395         to send and receive bulk data information.
396
397         * Tds70.cs (IsBlobType, IsLargeType): Moved methods to Tds.cs.
398
399         * TdsComm.cs: Fixed 2.0 compilation warnings.
400
401         * Tds50.cs: Fixed compilation warnings.
402
403         * Tds42.cs: Fixed compilation warnings.
404
405         * TdsPacketType.cs: Added Bulk type.
406
407 2007-05-30  Nagappan A  <anagappan@novell.com>
408
409         * TdsColumnType.cs: Added new types BigNVarChar, Variant to
410         TdsColumnType enumerator.
411
412         * TdsComm.cs (Append): Appends new data types to the TDS data
413         stream and also implemented new Append overloaded method.
414
415         * Tds.cs (BeginLoad): New case to handle BigBinary.
416         (GetMoneyValue): Simplified the switch / case conditions.
417
418         * TdsDataRow.cs: Instance of index checks for the given index to
419         be less than list count, else an exception will be thrown.
420
421         * Tds70.cs (sqlserverMagic): Modified byte values.
422         (ExecProc): Now directly calls ExecRPC for any number of
423         parameters being passed.
424         (ExecRPC): New logic to handle parameters.
425         (WriteParameterInfo): New private method to generate information
426         about each parameter.
427         (ProcessReturnStatus): New protected method to process the return
428         status of output parameter value.
429
430 2007-03-21  Nagappan A  <anagappan@novell.com>
431
432         * Tds70.cs (BuildParameters, FormatParameter): Include @ before
433         parameter name, if doesnot exist.
434
435 2006-07-18  Dean Brettle <dean@brettle.com>
436
437         * Tds70.cs : Fixed bug in FormatParameter() which caused 
438         ArgumentOutOfRangeException when formatting 0-length varbinary values
439         under 1.0 profile.
440
441 2006-05-03  Senganal T  <tsenganal@novell.com>
442
443         * Tds.cs : 
444                 - SetCharset () : Fix to set the Charset correctly.
445                 Patch from Andrzej Kurzeja
446
447 2006-03-08  Senganal T  <tsenganal@novell.com>
448
449         * Tds70.cs :
450                 - ProcessColumnInfo () : Set IsAutoIncrement Value for the column.
451
452 2006-02-10  Senganal T  <tsenganal@novell.com>
453
454         * Tds.cs :
455                 - GetSequentialColumn,BeginLoad, EndLoad,
456                 LoadData, SkipRow, SkipToColumnIndex
457                 New Methods to Support sequential loading of row data
458         * TdsComm.cs :
459                 - Skip : Changed arugment type from int to long.
460
461 2006-01-27  Senganal T  <tsenganal@novell.com>
462
463         * Tds.cs :
464                 - Modified GetSqlMoney () , to set the precision and Scale correctly.
465                 - Modified ProcessColumnDetails , to set the schema values correctly.
466         * TdsDataColumn.cs : Added some default values for the column schema
467         
468 2005-12-07  Senganal T  <tsenganal@novell.com>
469
470         * Tds50.cs :
471                 - IsValidRowCount () : Find out if a row count is valid.
472                 Fixes bug #76280
473         * Tds.cs :
474                 - ProcessEndToken (): Removed some redundant code.
475
476 2005-12-03  Senganal T  <tsenganal@novell.com>
477
478         * Tds70.cs : 
479                 - FormatParameter () : For DateTime Parameters, convert the value if
480                 specified as a string. Fixes bug#76880
481
482 2005-11-24  Senganal T  <tsenganal@novell.com>
483
484         * Tds.cs 
485         * Tds70.cs : 
486                 - Modifications to set the desired packetsize info when connecting
487                 to database
488
489 2005-11-23  Senganal T  <tsenganal@novell.com>
490         
491         * TdsComm.cs : 
492                 - ResizeOutBuf : Modified to shrink the output buffer if
493                 the block size is reduced. Fixed bug #76778     
494
495 2005-10-27  Senganal T  <tsenganal@novell.com>
496         
497         * Tds.cs :
498                 - Added a virtual method IsValidRowCount ()
499                 - Modified the way RecordsAffected is being counted
500
501         * Tds70.cs :
502                 - Overrode IsValidRowCount(), to check if the rowcount
503                 returned by sqlserver is valid.
504
505 2005-10-19  Senganal T  <tsenganal@novell.com>
506
507         * TdsConnectionParameter.cs :
508                 - Added a class variable 'AttachDBFileName' to store the location
509                 of the DB file.
510
511         * Tds70.cs (Connect) :
512                 - Modified to append the bytes corresponding to AttachDBFileName 
513                 into the Tds Packets. 
514
515 2005-08-26  Sureshkumar T  <tsureshkumar@novell.com>
516
517         * Tds70.cs (ExecProc): if no parameters, execute via RPC. parameter
518         support has to be added.
519
520         * Tds.cs (ExecRPC): added virtual method to execute via RPC.
521
522         This fixes bug #68978 by enabling execution of sp_reset_connection.
523
524 2005-08-24  Sureshkumar T  <tsureshkumar@novell.com>
525
526         * Tds.cs: ProcessColumnDetail (): expression columns don't have
527         baseTableName.
528
529 2005-08-05  Sureshkumar T  <tsureshkumar@novell.com>
530
531         * Tds70.cs: Reset (): remove exec.
532
533 2005-07-01  Sureshkumar T  <tsureshkumar@novell.com>
534
535         * Tds70.cs: FormatParameter: For uniqueidentifier, pass the guid
536         as '..' rather than hex. Tested with SqlServer 2005.
537
538         patch from jsinger@eggmouse.com & Hubert FONGARNAND.
539
540 2005-06-29  Sureshkumar T  <tsureshkumar@novell.com>
541
542         * TdsInternalException.cs: Add ctor for InnerException.
543
544         * TdsComm.cs: Throw TdsInternalException rather than
545         SocketException.
546
547 2005-06-01  Sureshkumar T  <tsureshkumar@novell.com>
548
549         * Tds50.cs: add a special case for datetime parameters to convert
550         to invariant culture. fixes bug #74910.
551
552 2005-04-07  Sureshkumar T  <tsureshkumar@novell.com>
553             Ankit Jain     <radical@corewars.org>
554
555         * TdsComm.cs: GetPhysicalPacket is devided further into seperate
556         methods GetPhysicalPacketHeader and
557         GetPhysicalPacketData. Implemented asynchronous ReadPacket method.
558
559         * ITds.cs: Added additional methods for asynchronous operations.
560
561         * Tds.cs: Implemented base methods for asynchronous
562         operations. Version specific derivatives should override for
563         specific operations.
564
565         * Tds70.cs: For stored procedure, "exec" is prefixed by
566         default. Implemented asynchronous method for asynchronous command
567         execution.
568
569         * TdsAsyncState.cs: Added. Internal asynchronous state object.
570
571         * TdsAsyncResult.cs: Added. Internal asynchronous result
572         implementation.
573
574 2005-04-04  Sureshkumar T  <tsureshkumar@novell.com>
575
576         * Tds50.cs: Pass parameters to the server. cut & paste from
577         Tds70.cs. To make the parmeters work with SybaseClient.
578
579 2005-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
580
581         * Tds70.cs: turns out that sp_reset_connection procedure might not be
582         found ("Invalid object name 'sp_reset_connection'"). In this case, and
583         if we get a proper state ('Class' property in the SqlException), just
584         ignore the error.
585
586         * TdsConnectionPool.cs: if the connection cannot be reset, attemp to
587         disconnect it before losing the last reference to it.
588
589 2005-03-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
590
591         * Tds.cs: set the charset for MS SQL 2000. Patch from Aleksandar
592         Dezelin. Closes bug #73591.
593
594 2005-02-04  Sureshkumar T  <tsureshkumar@novell.com>
595
596         * Tds.cs (ProcessEndToken): Added a bool validRowCount and add to
597         recordsAffected count if we meet DoneInProc..
598
599 2005-02-02  Sureshkumar T  <tsureshkumar@novell.com>
600
601         * TdsConnectionParameters.cs: added a method Reset to initialize
602         parameters again.
603
604 2005-01-16  Daniel Morgan <danielmorgan@verizon.net>
605
606         * Tds.cs: TDS 5.0 (Sybase) needs to get a DECIMAL
607         differently than TDS 7.0 (SqlServer).  Fixes bug 70228.
608         Thanks to Sebastien Robitaille for the patch for Sybase.
609         
610 2005-01-07  Sureshkumar T  <tsureshkumar@novell.com>
611
612         * Tds70.cs : 
613         - add a special case for datetime parameters to convert to
614         invariant culture. fixes bug #70209.
615         - change format to MMM dd yyyy, this works for both client locale
616         change and server login locale change. fixes bug #66564.
617
618 2005-01-06  Sureshkumar T  <tsureshkumar@novell.com>
619
620         * Tds.cs: change the typecast to ushort for
621         GetDateTimeValue. fixes bug #70651.
622
623 2004-11-06 Gert Driesen <drieseng@users.sourceforge.net>
624         * Tds70.cs: avoid unnecessary property call.    
625
626 2004-11-01 Gert Driesen <drieseng@users.sourceforge.net>
627         
628         * Tds70.cs: when type of parameter value is enum, convert value to
629         underlying type before converting value to string as we'd otherwise
630         be using the enum field name
631
632 2004-10-30 Umadevi S <sumadevi@novell.com>
633         * Tds.cs : GetColumnValue method: handling null guid values correctly.
634                 This fixes bug #68804. 
635                 Thanks for the patch /bug report by Aleksandar Dezelin
636
637 2004-10-14 Umadevi S <sumadevi@novell.com>
638         * Tds.cs : GetTextValue method- handling zero length string correctly
639                 This fixes bug #67916
640
641 2004-08-14 Geoff Norton <gnorton@customerdna.com>
642
643         * TdsComm.cs: 
644           Tds70.cs: 
645                 Make Tds70 work on Big Endian machines.
646                 BitConverter uses unsafe and returns things in host order; we need to 
647                 swap some values to put them back into the approrpiate order for the wire.
648
649 2004-08-09 Sureshkumar T <tsureshkumar@novell.com>
650         * Tds70.cs - Prepare Method stored procedure handle read problem fixed.
651
652 2004-06-30 Umadevi S <sumadevi@novell.com>
653         * Tds.cs - In the NextResult method handling TdsPacketSubType. TableName. 
654
655
656 2004-04-22  Sebastien Pouliot <sebastien@ximian.com> 
657
658         * Tds70.cs: Updated to match changes in Mono.Security.dll.
659
660 2004-04-05  Lluis Sanchez Gual  <lluis@ximian.com>
661
662         * ITds.cs: Added method for reseting a connection.
663         * Tds.cs: Added base implementation for ITds.Reset.
664         * Tds70.cs: Implemented ITds.Reset().
665         * TdsConnectionPool.cs: Implemented connection pool that can be reused by 
666           all Tds clients.
667
668 2004-04-01  Lluis Sanchez Gual  <lluis@ximian.com>
669
670         * Tds.cs: All methods now return DBNull instead of null for null values.
671         * Tds50.cs, Tds70.cs: Support parameters with DBNull value.
672
673 2003-12-21  Tim Coleman <tim@timcoleman.com>
674         * Tds70.cs:
675                 Fix Integrated Security to work with Domain users.
676
677 2003-12-06  Sebastien Pouliot <spouliot@videotron.ca> 
678         for Daniel Morgan <danielmorgan@verizon.net>
679
680         Sebastien Pouliot (spouliot@motus.com) helped me greatly with his
681         NTLM stuff.
682         
683         * Mono.Data.Tds.Protocol/Tds.cs
684         * Mono.Data.Tds.Protocol/Tds70.cs
685         * Mono.Data.Tds.Protocol/TdsConnectionParameters.cs
686         * Mono.Data.Tds.Protocol/TdsPacketSubType.cs
687         * Mono.Data.Tds.Protocol/TdsPacketType.cs: added NT Authentication aka
688         Integrated Security aka Domain Login
689         
690 2003-10-19  Joerg Rosenkranz <joergr@voelcker.com>
691
692         * Tds.cs (GetStringValue): A string length of 0xFF (255) is not
693         misinterpreted as special value anymore.
694         
695         This is a fix to bug #49835.
696
697 2003-10-03  Diego Caravana  <diego@toth.it>
698
699         * Tds70.cs: Now handles parameters of type ReturnValue and
700         InputOutput.
701         (BuildParameters): skips the ReturnValue params and builds the
702         set string considering the assigned value for InputOutput ones.
703         (BuildProcedureCall): like the preceding one plus adds the return
704         value to the final select.
705         
706 2003-08-22  Duncan Mak  <duncan@ximian.com>
707
708         * Tds.cs (ProcessEndToken): RecordsAffected was not filled
709         correctly. I've found out that the record count was submitted for
710         TdsPacketSubType.Done. So I changed the behaviour to include this
711         (without deeper knowledge of the TDS protocol). Patch from Jörg
712         Rosenkranz <joergr@voelcker.com>.
713
714         This is part of a fix to bug #40315.
715         
716 2003-05-07  Miguel de Icaza  <miguel@ximian.com>
717
718         Patches from Igor Nosyryev <nosyryev@attbi.com>
719         
720         * TdsComm.cs: (GetString): GetString adds extra byte to a string
721         at end. It suppose to be '\0', but '\0' is valid value in .NET
722         string, so this byte must not be used.
723  
724         * Tds.cs (GetDecimalValue):Method reads extra byte if a DECIMAL
725         field contains NULL. As a result server's response is parsed
726         incorrectly and this method fires an exception.
727
728 2003-01-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
729
730         * Tds70.cs:
731         (FormatParameter): send input/output parameter names. This way we don't
732         depend on the parameter position being different of the index in the
733         parameter collection.
734
735 2002-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
736
737         * Tds.cs:
738         (Disconnect): close the stream and set connected to false.
739         (NextResult): check if after DoneProc we have a ColumnMetadata + Row,
740         which holds the values for the output parameters and read them.
741         (LoadRow): add the values to outputParameters if DoneProc.
742         When executing a stored procedure, we execute the procedure and then
743         select the parameter values.
744
745         * Tds70.cs:
746         (BuildParameters): check Parameters.
747
748         * TdsComm.cs: added Close () to close the stream.
749
750         * TdsConnectionParameters.cs: initialize all the string to be empty.
751
752 2002-11-04  Tim Coleman (tim@timcoleman.com)
753         * TdsBigDecimal.cs:
754                 New class added to handle (potentially) large
755                 decimal values
756         * Tds.cs:
757                 Modified to use TdsBigDecimal instead of
758                 decimal for transit of (potentially) large
759                 decimal values
760
761 2002-11-03  Tim Coleman (tim@timcoleman.com)
762         * TdsColumnStatus.cs:
763                 Newly added to handle column metadata
764         * Tds.cs
765                 Handle table name and column detail results
766         * Tds42.cs
767         * Tds50.cs
768         * Tds70.cs
769                 rename TableName BaseTableName for consistency
770         * TdsPacketSubType.cs:
771                 We now know what subtype 0xa5 is
772         * TdsPacketTableNameResult.cs:
773                 Add means to store table names
774         * TdsSchemaInfo.cs:
775                 Add new schema information
776
777 2002-11-01  Tim Coleman (tim@timcoleman.com)
778         * ITds.cs:
779                 Add DoneProc property
780         * Tds.cs:
781                 *Lots*.  Some stuff to get binary types
782                 to work, other stuff to get new prepares
783                 working.
784         * TdsPacketEndTokenResult.cs:
785                 Add Packetsubtype property
786         * TdsPacketRowResult:
787                 Now implements ICollection and IList.
788
789 2002-10-31  Tim Coleman (tim@timcoleman.com)
790         * TdsSchemaInfo.cs:
791                 Added because I can't really use SchemaInfo
792         * ITds.cs:
793         * Tds.cs :
794         * TdsPacketColumnInfoResult.cs :
795                 ChangeDefinition of schema
796         * Tds42.cs :
797         * Tds50.cs :
798         * Tds70.cs :
799                 Add new information to schema
800
801
802 2002-10-30  Tim Coleman (tim@timcoleman.com)
803         * TdsColumnSchema.cs:
804                 Ditch this in favor of System.Data.Common.SchemaInfo
805         * ITds.cs:
806                 Change ColumnInfo to Schema
807         * Tds.cs:
808                 Uses new SchemaInfo object
809                 Supports TEXT now.      
810         * Tds42.cs:
811         * Tds50.cs:
812         * Tds70.cs:
813         * TdsPacketColumnInfoResult.cs:
814         * TdsPacketRowResult.cs:
815                 Uses new SchemaInfo object
816         
817
818 2002-10-29  Tim Coleman (tim@timcoleman.com)
819         * ITds.cs:
820                 Add OutputParameters collection
821         * Tds.cs:
822                 Much reformatting, added handling for dates,
823                 fixed handling of output parameters, and a
824                 whole lot more
825         * TdsPacketEndTokenResult.cs:
826                 Remove incorrect exception
827         * TdsPacketType.cs:
828                 Add Logoff packet type.
829
830 2002-10-28  Tim Coleman (tim@timcoleman.com)
831         * Tds.cs:
832                 Add much handling to get the following types
833                 working in queries: string, int, decimal
834                 All sorts of other bug fixing and general
835                 purpose hackery.
836         * Tds42.cs:
837         * Tds50.cs:
838         * Tds70.cs:
839                 ProcessColumnInfo was abstracted in Tds.cs
840                 and subclassed, because 7.0 provides the information
841                 in a different format.
842         * TdsColumnSchema.cs:
843                 Added size, precision, scale
844         * TdsComm.cs:
845                 Fixed GetString because it wasn't working properly
846                 with TDS 7.0.
847         * TdsMessage.cs:
848                 Change state and severity to byte instead of int
849                 because that is more consitent.
850                 
851
852 2002-10-25  Tim Coleman (tim@timcoleman.com)
853         * TdsPacketErrorResultCollection.cs:
854                 New class added for exporting errors
855         * ITds.cs:
856         * Tds.cs:
857         * Tds70.cs:
858         * TdsComm.cs:
859         * TdsPacketEndTokenResult.cs:
860         * TdsPacketRowResult.cs:
861                 Changes to make SqlClient build.
862
863 2002-10-24  Tim Coleman (tim@timcoleman.com)
864         * ITds.cs:
865                 Added column info, and NextResult/NextRow
866                 to interface
867         * TdsColumnSchema.cs:
868                 New class added to keep track of column info
869         * Tds.cs:
870                 Many, many changes to get queries working
871                 for the most part.
872         * TdsPacketColumnInfoResult.cs:
873         * TdsPacketColumnNamesResult.cs:
874                 Doesn't use a DataColumnCollection anymore
875                 Also more complete.
876         * TdsPacketRowResult.cs:
877                 Added Add() method.
878
879 2002-10-23  Tim Coleman (tim@timcoleman.com)
880         * ITds.cs:
881         * Tds42.cs:
882         * Tds50.cs:
883         * Tds70.cs:
884         * Tds80.cs:
885                 New classes added.  Functionality
886                 is split up because different protocols
887                 have slight differences.
888         * Tds.cs:
889                 Remove some unnecessary code after
890                 the above split, and add in a whole
891                 lot more stuff for completeness.
892         * TdsColumnType.cs:
893                 Fix Int4.  Wrong enum value.
894         * TdsComm.cs:
895                 Move the encoder out of constructor
896                 because we don't know the charset at
897                 that point
898         * TdsConnectionParameters.cs:
899                 Small changes
900         * TdsPacketEndTokenResult.cs:
901                 Implement ToString ()
902
903
904 2002-10-22  Tim Coleman (tim@timcoleman.com)
905         * Tds.cs :
906                 More implementation.  Does some
907                 query stuff now.  Can also change
908                 database.
909         * TdsConnectionParameters.cs:
910                 Rename Host to DataSource, and
911                 add Hostname for the local hostname.
912         * TdsPacketEndTokenResult.cs:
913                 Change TODO attribute
914         * TODOAttribute.cs:
915                 New class added
916         
917
918 2002-10-21  Tim Coleman (tim@timcoleman.com)
919         * Tds.cs
920         * TdsComm.cs:
921                 A whole slew of changes to get logon
922                 to work (it now works in both TDS 7.0
923                 and TDS 4.2) ... danmorg can test with
924                 8.0 if he likes.
925                 TdsComm has some simplifications too,
926                 because C# has some features not present
927                 in the Java implementation.
928         * TdsConnectionParameters.cs:
929                 Change a few default values.
930         * TdsMessage.cs:
931                 Implement this class.
932
933 2002-10-20  Tim Coleman (tim@timcoleman.com)
934         * TdsColumnType.cs:
935         * TdsContext.cs:
936         * TdsEnvPacketSubType.cs:
937         * TdsMessage.cs:
938         * TdsPacketColumnInfoResult.cs:
939         * TdsPacketColumnNamesResult.cs:
940         * TdsPacketColumnOrderResult.cs:
941         * TdsPacketControlResult.cs:
942         * TdsPacketEndTokenResult.cs:
943         * TdsPacketErrorResult.cs:
944         * TdsPacketMessageResult.cs:
945         * TdsPacketOutputParam.cs:
946         * TdsPacketResult.cs:
947         * TdsPacketRetStatResult.cs:
948         * TdsPacketRowResult.cs:
949         * TdsPacketSubType.cs:
950         * TdsPacketTableNameResult.cs:
951         * TdsPacketUnknown.cs:
952                 New classes added as part of TDS internal implementation.
953         * Tds.cs:
954                 Some work on receiving and interpreting packages received from
955                 SQL Server.  Still doesn't work completely.
956         * TdsComm.cs:
957                 Add some methods as part of the ongoing work with Tds.cs
958         * TdsConnectionParameters.cs:
959                 Add default values for Encoding ("iso-8859-1"), Port (1433), 
960                 TDS Version (4.2).
961
962 2002-10-18  Tim Coleman (tim@timcoleman.com)
963         * TdsConnectionInternal:
964                 Add some implementation details
965         * TdsCommInternal:
966                 New class, which will handle the low-level
967                 communication with the database
968         * TdsPacketTypeInternal:
969                 Add new packet type, TdsPacketTypeInternal.None
970                 which is used when no packet is being constructed.
971                 The value is 0.
972
973 2002-10-17  Tim Coleman (tim@timcoleman.com)
974         * ChangeLog:
975                 New changelog added
976         * TdsCommandInternal.cs:
977         * TdsConnectionInternal.cs:
978         * TdsPacketTypeInternal.cs:
979         * TdsServerTypeInternal.cs:
980         * TdsTransactionInternal.cs:
981         * TdsVersionInternal.cs:
982                 New classes added.  These are the
983                 internal implementations, meant for
984                 "wrapping" from other locations.