//
-// Mono.Data.TdsClient.Internal.Tds42.cs
+// Mono.Data.Tds.Protocol.Tds42.cs
//
// Author:
// Tim Coleman (tim@timcoleman.com)
// Copyright (C) 2002 Tim Coleman
//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
using System;
-namespace Mono.Data.TdsClient.Internal {
- internal class Tds42 : Tds
+namespace Mono.Data.Tds.Protocol {
+ public class Tds42 : Tds
{
#region Fields
Comm.SendPacket ();
- TdsPacketResult result;
- bool done = false;
+ MoreResults = true;
+ SkipToEnd ();
- while (!done) {
- result = ProcessSubPacket ();
- done = (result is TdsPacketEndTokenResult);
- }
return IsConnected;
}
- protected override TdsPacketColumnInfoResult ProcessColumnInfo ()
+ protected override TdsDataColumnCollection ProcessColumnInfo ()
{
byte precision;
byte scale;
int totalLength = Comm.GetTdsShort ();
int bytesRead = 0;
- TdsPacketColumnInfoResult result = new TdsPacketColumnInfoResult ();
+ TdsDataColumnCollection result = new TdsDataColumnCollection ();
while (bytesRead < totalLength) {
scale = 0;
bytesRead += 1;
}
- int index = result.Add (new TdsSchemaInfo ());
+ int index = result.Add (new TdsDataColumn ());
result[index]["NumericPrecision"] = precision;
result[index]["NumericScale"] = scale;
result[index]["ColumnSize"] = bufLength;