2002-11-18 Tim Coleman <tim@timcoleman.com>
authorTim Coleman <tim@mono-cvs.ximian.com>
Tue, 19 Nov 2002 07:18:33 +0000 (07:18 -0000)
committerTim Coleman <tim@mono-cvs.ximian.com>
Tue, 19 Nov 2002 07:18:33 +0000 (07:18 -0000)
        * Mono.Data.TdsClient.Internal/Tds.cs:
        * Mono.Data.TdsClient.Internal/Tds50.cs:
        * Mono.Data.TdsClient.Internal/TdsComm.cs:
        * Mono.Data.TdsClient.Internal/TdsPacketSubType.cs:
        * Mono.Data.TdsClient.Internal/TdsPacketType.cs:
                Sybase compatibility fixes.

svn path=/trunk/mcs/; revision=9066

mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs
mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds50.cs
mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs
mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsPacketSubType.cs
mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsPacketType.cs
mcs/class/Mono.Data.TdsClient/ChangeLog
mcs/class/Mono.Data.TdsClient/Mono.Data.TdsClient.Internal/Tds.cs
mcs/class/Mono.Data.TdsClient/Mono.Data.TdsClient.Internal/Tds50.cs
mcs/class/Mono.Data.TdsClient/Mono.Data.TdsClient.Internal/TdsComm.cs
mcs/class/Mono.Data.TdsClient/Mono.Data.TdsClient.Internal/TdsPacketSubType.cs
mcs/class/Mono.Data.TdsClient/Mono.Data.TdsClient.Internal/TdsPacketType.cs

index 6b96f019ccffd7d6c25c152fab1d7dfc3dca8d45..5e21e518e59d4a0023dee6d4799e1f726a83a65d 100644 (file)
@@ -1049,23 +1049,34 @@ namespace Mono.Data.TdsClient.Internal {
                        int number = comm.GetTdsInt ();
                        byte state = comm.GetByte ();
                        byte theClass = comm.GetByte ();
-                       string message = comm.GetString (comm.GetTdsShort ());
-
-
-                       string server = comm.GetString (comm.GetByte ());
-
-                       if (subType != TdsPacketSubType.Info && subType != TdsPacketSubType.Error) 
-                               return;
-
-                       string procedure = comm.GetString (comm.GetByte ());
-                       byte lineNumber = comm.GetByte ();
-                       string source = String.Empty; // FIXME
+                       string message;
+                       string server;
+                       string procedure;
+                       byte lineNumber;
+                       string source;
+                       bool isError = false;
+
+                       if (subType == TdsPacketSubType.EED) {
+                               isError = (theClass <= 10);
+                               comm.Skip (comm.GetByte ()); // SQL State
+                               comm.Skip (1);               // Status
+                               comm.Skip (2);               // TranState
+                       } else 
+                               isError = (subType == TdsPacketSubType.Error);
+
+                       message = comm.GetString (comm.GetTdsShort ());
+                       server = comm.GetString (comm.GetByte ());
+                       procedure = comm.GetString (comm.GetByte ());
+                       lineNumber = comm.GetByte ();
+                       source = String.Empty; // FIXME
+
+                       if (subType != TdsPacketSubType.EED)
+                               comm.Skip (1);
 
-                       comm.GetByte ();
-                       if (subType == TdsPacketSubType.Error)
-                               OnTdsErrorMessage (CreateTdsErrorMessageEvent (theClass, lineNumber, message, number, procedure, server, source, state));
-                       else
+                       if (isError)
                                messages.Add (new TdsInternalError (theClass, lineNumber, message, number, procedure, server, source, state));
+                       else
+                               OnTdsErrorMessage (CreateTdsErrorMessageEvent (theClass, lineNumber, message, number, procedure, server, source, state));
                }
 
                private TdsPacketOutputParam ProcessOutputParam ()
@@ -1104,7 +1115,7 @@ namespace Mono.Data.TdsClient.Internal {
                                result = ProcessEnvChange ();
                                break;
                        case TdsPacketSubType.Info :
-                       case TdsPacketSubType.Msg50Token :
+                       case TdsPacketSubType.EED:
                        case TdsPacketSubType.Error :
                                ProcessMessage (subType);
                                break;
index 49ce8bd1d36b09877be6c3f3d1eab08fde1b2a2c..09cc19a62d1affe41d60fe9c4f6e69479ecc7d92 100644 (file)
@@ -21,7 +21,7 @@ namespace Mono.Data.TdsClient.Internal {
                #region Constructors
 
                public Tds50 (string server, int port)
-                       : this (server, port, 512, 15)
+                       : this (server, port, 8192, 15)
                {
                }
 
@@ -39,6 +39,9 @@ namespace Mono.Data.TdsClient.Internal {
                        if (IsConnected)
                                throw new InvalidOperationException ("The connection is already open.");
 
+                       // some voodoo magic here.
+                       byte[] capabilities = {0x01,0x07,0x03,109,127,0xFF,0xFF,0xFF,0xFE,0x02,0x07,0x00,0x00,0x0A,104,0x00,0x00,0x00};
+
                        SetCharset (connectionParameters.Charset);
                        SetLanguage (connectionParameters.Language);
 
@@ -48,44 +51,38 @@ namespace Mono.Data.TdsClient.Internal {
                        Comm.StartPacket (TdsPacketType.Logon);
 
                        // hostname (offset 0)
+                       // 0-30
                        byte[] tmp = Comm.Append (connectionParameters.Hostname, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // username (offset 31 0x1f)
+                       // 31-61
                        tmp = Comm.Append (connectionParameters.User, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // password (offset 62 0x3e)
+                       // 62-92
                        tmp = Comm.Append (connectionParameters.Password, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // hostproc (offset 93 0x5d)
-                       Comm.Append ("00000116", 8, pad);
-
-                       // unused (offset 109 0x6d)
-                       Comm.Append (empty, (30-14), pad);
-
-                       // apptype 
-                       Comm.Append ((byte) 0x0);
-                       Comm.Append ((byte) 0xa0);
-                       Comm.Append ((byte) 0x24);
-                       Comm.Append ((byte) 0xcc);
-                       Comm.Append ((byte) 0x50);
-                       Comm.Append ((byte) 0x12);
-
-                       // hostproc length 
-                       Comm.Append ((byte) 8);
+                       // 93-123
+                       tmp = Comm.Append ("37876", 30, pad);
+                       Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // Byte order of 2 byte ints
                        // 2 = <MSB, LSB>, 3 = <LSB, MSB>
+                       // 124
                        Comm.Append ((byte) 3);
 
                        // Byte order of 4 byte ints
                        // 0 = <MSB, LSB>, 1 = <LSB, MSB>
+                       // 125
                        Comm.Append ((byte) 1);
 
                        // Character representation
                        // (6 = ASCII, 7 = EBCDIC)
+                       // 126
                        Comm.Append ((byte) 6);
 
                        // Eight byte floating point representation
@@ -93,108 +90,135 @@ namespace Mono.Data.TdsClient.Internal {
                        // 5 = VAX 'D'
                        // 10 = IEEE <LSB, ..., MSB>
                        // 11 = ND5000
+                       // 127
                        Comm.Append ((byte) 10);
 
                        // Eight byte date format
                        // 8 = <MSB, ..., LSB>
+                       // 128
                        Comm.Append ((byte) 9);
                
                        // notify of use db
+                       // 129
                        Comm.Append ((byte) 1);
 
                        // disallow dump/load and bulk insert
+                       // 130
                        Comm.Append ((byte) 1);
 
                        // sql interface type
+                       // 131
                        Comm.Append ((byte) 0);
 
                        // type of network connection
+                       // 132
                        Comm.Append ((byte) 0);
 
-
                        // spare [7]
+                       // 133-139
                        Comm.Append (empty, 7, pad);
+
                        // appname
+                       // 140-170
                        tmp = Comm.Append (connectionParameters.ApplicationName, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // server name
+                       // 171-201
                        tmp = Comm.Append (DataSource, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // remote passwords
+                       // 202-457      
                        Comm.Append (empty, 2, pad);
                        tmp = Comm.Append (connectionParameters.Password, 253, pad);
                        Comm.Append ((byte) (tmp.Length < 253 ? tmp.Length + 2 : 253 + 2));
 
                        // tds version
-                       Comm.Append ((byte) (((byte) Version) / 10));
-                       Comm.Append ((byte) (((byte) Version) % 10));
+                       // 458-461
+                       Comm.Append ((byte) 5);
+                       Comm.Append ((byte) 0);
                        Comm.Append ((byte) 0);
                        Comm.Append ((byte) 0);
 
                        // prog name
+                       // 462-472
                        tmp = Comm.Append (connectionParameters.ProgName, 10, pad);
                        Comm.Append ((byte) (tmp.Length < 10 ? tmp.Length : 10));
 
                        // prog version
+                       // 473-476
                        Comm.Append ((byte) 6);
-
-                       // Tell the server we can handle SQLServer version 6
                        Comm.Append ((byte) 0);
-
-                       // Send zero to tell the server we can't handle any other version
                        Comm.Append ((byte) 0);
                        Comm.Append ((byte) 0);
 
                        // auto convert short
+                       // 477
                        Comm.Append ((byte) 0);
 
                        // type of flt4
+                       // 478
                        Comm.Append ((byte) 0x0d);
 
                        // type of date4
+                       // 479
                        Comm.Append ((byte) 0x11);
 
                        // language
+                       // 480-510
                        tmp = Comm.Append (Language, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // notify on lang change
+                       // 511
                        Comm.Append ((byte) 1);
 
                        // security label hierarchy
+                       // 512-513
                        Comm.Append ((short) 0);
 
                        // security components
+                       // 514-521
                        Comm.Append (empty, 8, pad);
 
                        // security spare
+                       // 522-523
                        Comm.Append ((short) 0);
 
                        // security login role
+                       // 524
                        Comm.Append ((byte) 0);
 
                        // charset
+                       // 525-555
                        tmp = Comm.Append (Charset, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // notify on charset change
+                       // 556
                        Comm.Append ((byte) 1);
 
                        // length of tds packets
+                       // 557-563
                        tmp = Comm.Append (PacketSize.ToString (), 6, pad);
-                       Comm.Append ((byte) 3);
+                       Comm.Append ((byte) (tmp.Length < 6 ? tmp.Length : 6));
 
-                       // pad out to a longword
                        Comm.Append (empty, 8, pad);
+                       // Padding...
+                       // 564-567
+                       //Comm.Append (empty, 4, pad);
+
+                       // Capabilities
+                       //Comm.Append ((byte) TdsPacketType.Capability);
+                       //Comm.Append ((short) 18);
+                       //Comm.Append (capabilities, 18, pad);
 
                        Comm.SendPacket ();
 
-                       TdsPacketResult result;
                        bool done = false;
                        while (!done) {
-                               result = ProcessSubPacket ();
+                               TdsPacketResult result = ProcessSubPacket ();
                                done = (result is TdsPacketEndTokenResult);
                        }
                        return IsConnected;
index 5680afbd24344f2ca590666437427d753e3e590c..8572d7f62b0173a7ec669f325ec18f4eb770febd 100644 (file)
@@ -196,9 +196,8 @@ namespace Mono.Data.TdsClient.Internal {
                                Append ((byte) (((byte) (l >> 8)) & 0xff));
                                Append ((byte) (((byte) (l >> 0)) & 0xff));
                        }
-                       else {
+                       else 
                                Append (BitConverter.GetBytes (l));
-                       }
                }
 
                private void ConnectCallback (IAsyncResult ar)
index f56863bc49e25948ebfd00b2f5e44bcd91a13538..4f2644b757e35769443d0851ec03f9f492fa1601 100644 (file)
@@ -12,7 +12,7 @@ namespace Mono.Data.TdsClient.Internal {
                EnvChange = 0xe3,
                Error = 0xaa,
                Info = 0xab,
-               Msg50Token = 0xe5,
+               EED = 0xe5,
                Param = 0xac,
                LoginAck = 0xad,
                ReturnStatus = 0x79,
index 639b417909d12f44ecc8f496129b4d4f699317df..3c7d7afa19c3f50d44992acb3d41809930aec147 100644 (file)
@@ -17,6 +17,7 @@ namespace Mono.Data.TdsClient.Internal {
                Reply = 0x4,
                Cancel = 0x6,
                Logon70 = 0x10,
-               Logoff = 0x71
+               Logoff = 0x71,
+               Capability = 0xe2
        }
 }
index 9078dabd6dde72beea39da710457359b46ac9b3f..7bbdcb59b299c88bcf25e05908fa307da2e13919 100644 (file)
@@ -1,3 +1,11 @@
+2002-11-18  Tim Coleman <tim@timcoleman.com>
+       * Mono.Data.TdsClient.Internal/Tds.cs:
+       * Mono.Data.TdsClient.Internal/Tds50.cs:
+       * Mono.Data.TdsClient.Internal/TdsComm.cs:
+       * Mono.Data.TdsClient.Internal/TdsPacketSubType.cs:
+       * Mono.Data.TdsClient.Internal/TdsPacketType.cs:
+               Sybase compatibility fixes.
+
 2002-11-15  Tim Coleman <tim@timcoleman.com>
        * Mono.Data.TdsClient.Internal/Tds.cs:
                Add support for UniqueIdentifier (GUID),
index 6b96f019ccffd7d6c25c152fab1d7dfc3dca8d45..5e21e518e59d4a0023dee6d4799e1f726a83a65d 100644 (file)
@@ -1049,23 +1049,34 @@ namespace Mono.Data.TdsClient.Internal {
                        int number = comm.GetTdsInt ();
                        byte state = comm.GetByte ();
                        byte theClass = comm.GetByte ();
-                       string message = comm.GetString (comm.GetTdsShort ());
-
-
-                       string server = comm.GetString (comm.GetByte ());
-
-                       if (subType != TdsPacketSubType.Info && subType != TdsPacketSubType.Error) 
-                               return;
-
-                       string procedure = comm.GetString (comm.GetByte ());
-                       byte lineNumber = comm.GetByte ();
-                       string source = String.Empty; // FIXME
+                       string message;
+                       string server;
+                       string procedure;
+                       byte lineNumber;
+                       string source;
+                       bool isError = false;
+
+                       if (subType == TdsPacketSubType.EED) {
+                               isError = (theClass <= 10);
+                               comm.Skip (comm.GetByte ()); // SQL State
+                               comm.Skip (1);               // Status
+                               comm.Skip (2);               // TranState
+                       } else 
+                               isError = (subType == TdsPacketSubType.Error);
+
+                       message = comm.GetString (comm.GetTdsShort ());
+                       server = comm.GetString (comm.GetByte ());
+                       procedure = comm.GetString (comm.GetByte ());
+                       lineNumber = comm.GetByte ();
+                       source = String.Empty; // FIXME
+
+                       if (subType != TdsPacketSubType.EED)
+                               comm.Skip (1);
 
-                       comm.GetByte ();
-                       if (subType == TdsPacketSubType.Error)
-                               OnTdsErrorMessage (CreateTdsErrorMessageEvent (theClass, lineNumber, message, number, procedure, server, source, state));
-                       else
+                       if (isError)
                                messages.Add (new TdsInternalError (theClass, lineNumber, message, number, procedure, server, source, state));
+                       else
+                               OnTdsErrorMessage (CreateTdsErrorMessageEvent (theClass, lineNumber, message, number, procedure, server, source, state));
                }
 
                private TdsPacketOutputParam ProcessOutputParam ()
@@ -1104,7 +1115,7 @@ namespace Mono.Data.TdsClient.Internal {
                                result = ProcessEnvChange ();
                                break;
                        case TdsPacketSubType.Info :
-                       case TdsPacketSubType.Msg50Token :
+                       case TdsPacketSubType.EED:
                        case TdsPacketSubType.Error :
                                ProcessMessage (subType);
                                break;
index 49ce8bd1d36b09877be6c3f3d1eab08fde1b2a2c..09cc19a62d1affe41d60fe9c4f6e69479ecc7d92 100644 (file)
@@ -21,7 +21,7 @@ namespace Mono.Data.TdsClient.Internal {
                #region Constructors
 
                public Tds50 (string server, int port)
-                       : this (server, port, 512, 15)
+                       : this (server, port, 8192, 15)
                {
                }
 
@@ -39,6 +39,9 @@ namespace Mono.Data.TdsClient.Internal {
                        if (IsConnected)
                                throw new InvalidOperationException ("The connection is already open.");
 
+                       // some voodoo magic here.
+                       byte[] capabilities = {0x01,0x07,0x03,109,127,0xFF,0xFF,0xFF,0xFE,0x02,0x07,0x00,0x00,0x0A,104,0x00,0x00,0x00};
+
                        SetCharset (connectionParameters.Charset);
                        SetLanguage (connectionParameters.Language);
 
@@ -48,44 +51,38 @@ namespace Mono.Data.TdsClient.Internal {
                        Comm.StartPacket (TdsPacketType.Logon);
 
                        // hostname (offset 0)
+                       // 0-30
                        byte[] tmp = Comm.Append (connectionParameters.Hostname, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // username (offset 31 0x1f)
+                       // 31-61
                        tmp = Comm.Append (connectionParameters.User, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // password (offset 62 0x3e)
+                       // 62-92
                        tmp = Comm.Append (connectionParameters.Password, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // hostproc (offset 93 0x5d)
-                       Comm.Append ("00000116", 8, pad);
-
-                       // unused (offset 109 0x6d)
-                       Comm.Append (empty, (30-14), pad);
-
-                       // apptype 
-                       Comm.Append ((byte) 0x0);
-                       Comm.Append ((byte) 0xa0);
-                       Comm.Append ((byte) 0x24);
-                       Comm.Append ((byte) 0xcc);
-                       Comm.Append ((byte) 0x50);
-                       Comm.Append ((byte) 0x12);
-
-                       // hostproc length 
-                       Comm.Append ((byte) 8);
+                       // 93-123
+                       tmp = Comm.Append ("37876", 30, pad);
+                       Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // Byte order of 2 byte ints
                        // 2 = <MSB, LSB>, 3 = <LSB, MSB>
+                       // 124
                        Comm.Append ((byte) 3);
 
                        // Byte order of 4 byte ints
                        // 0 = <MSB, LSB>, 1 = <LSB, MSB>
+                       // 125
                        Comm.Append ((byte) 1);
 
                        // Character representation
                        // (6 = ASCII, 7 = EBCDIC)
+                       // 126
                        Comm.Append ((byte) 6);
 
                        // Eight byte floating point representation
@@ -93,108 +90,135 @@ namespace Mono.Data.TdsClient.Internal {
                        // 5 = VAX 'D'
                        // 10 = IEEE <LSB, ..., MSB>
                        // 11 = ND5000
+                       // 127
                        Comm.Append ((byte) 10);
 
                        // Eight byte date format
                        // 8 = <MSB, ..., LSB>
+                       // 128
                        Comm.Append ((byte) 9);
                
                        // notify of use db
+                       // 129
                        Comm.Append ((byte) 1);
 
                        // disallow dump/load and bulk insert
+                       // 130
                        Comm.Append ((byte) 1);
 
                        // sql interface type
+                       // 131
                        Comm.Append ((byte) 0);
 
                        // type of network connection
+                       // 132
                        Comm.Append ((byte) 0);
 
-
                        // spare [7]
+                       // 133-139
                        Comm.Append (empty, 7, pad);
+
                        // appname
+                       // 140-170
                        tmp = Comm.Append (connectionParameters.ApplicationName, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // server name
+                       // 171-201
                        tmp = Comm.Append (DataSource, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // remote passwords
+                       // 202-457      
                        Comm.Append (empty, 2, pad);
                        tmp = Comm.Append (connectionParameters.Password, 253, pad);
                        Comm.Append ((byte) (tmp.Length < 253 ? tmp.Length + 2 : 253 + 2));
 
                        // tds version
-                       Comm.Append ((byte) (((byte) Version) / 10));
-                       Comm.Append ((byte) (((byte) Version) % 10));
+                       // 458-461
+                       Comm.Append ((byte) 5);
+                       Comm.Append ((byte) 0);
                        Comm.Append ((byte) 0);
                        Comm.Append ((byte) 0);
 
                        // prog name
+                       // 462-472
                        tmp = Comm.Append (connectionParameters.ProgName, 10, pad);
                        Comm.Append ((byte) (tmp.Length < 10 ? tmp.Length : 10));
 
                        // prog version
+                       // 473-476
                        Comm.Append ((byte) 6);
-
-                       // Tell the server we can handle SQLServer version 6
                        Comm.Append ((byte) 0);
-
-                       // Send zero to tell the server we can't handle any other version
                        Comm.Append ((byte) 0);
                        Comm.Append ((byte) 0);
 
                        // auto convert short
+                       // 477
                        Comm.Append ((byte) 0);
 
                        // type of flt4
+                       // 478
                        Comm.Append ((byte) 0x0d);
 
                        // type of date4
+                       // 479
                        Comm.Append ((byte) 0x11);
 
                        // language
+                       // 480-510
                        tmp = Comm.Append (Language, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // notify on lang change
+                       // 511
                        Comm.Append ((byte) 1);
 
                        // security label hierarchy
+                       // 512-513
                        Comm.Append ((short) 0);
 
                        // security components
+                       // 514-521
                        Comm.Append (empty, 8, pad);
 
                        // security spare
+                       // 522-523
                        Comm.Append ((short) 0);
 
                        // security login role
+                       // 524
                        Comm.Append ((byte) 0);
 
                        // charset
+                       // 525-555
                        tmp = Comm.Append (Charset, 30, pad);
                        Comm.Append ((byte) (tmp.Length < 30 ? tmp.Length : 30));
 
                        // notify on charset change
+                       // 556
                        Comm.Append ((byte) 1);
 
                        // length of tds packets
+                       // 557-563
                        tmp = Comm.Append (PacketSize.ToString (), 6, pad);
-                       Comm.Append ((byte) 3);
+                       Comm.Append ((byte) (tmp.Length < 6 ? tmp.Length : 6));
 
-                       // pad out to a longword
                        Comm.Append (empty, 8, pad);
+                       // Padding...
+                       // 564-567
+                       //Comm.Append (empty, 4, pad);
+
+                       // Capabilities
+                       //Comm.Append ((byte) TdsPacketType.Capability);
+                       //Comm.Append ((short) 18);
+                       //Comm.Append (capabilities, 18, pad);
 
                        Comm.SendPacket ();
 
-                       TdsPacketResult result;
                        bool done = false;
                        while (!done) {
-                               result = ProcessSubPacket ();
+                               TdsPacketResult result = ProcessSubPacket ();
                                done = (result is TdsPacketEndTokenResult);
                        }
                        return IsConnected;
index 5680afbd24344f2ca590666437427d753e3e590c..8572d7f62b0173a7ec669f325ec18f4eb770febd 100644 (file)
@@ -196,9 +196,8 @@ namespace Mono.Data.TdsClient.Internal {
                                Append ((byte) (((byte) (l >> 8)) & 0xff));
                                Append ((byte) (((byte) (l >> 0)) & 0xff));
                        }
-                       else {
+                       else 
                                Append (BitConverter.GetBytes (l));
-                       }
                }
 
                private void ConnectCallback (IAsyncResult ar)
index f56863bc49e25948ebfd00b2f5e44bcd91a13538..4f2644b757e35769443d0851ec03f9f492fa1601 100644 (file)
@@ -12,7 +12,7 @@ namespace Mono.Data.TdsClient.Internal {
                EnvChange = 0xe3,
                Error = 0xaa,
                Info = 0xab,
-               Msg50Token = 0xe5,
+               EED = 0xe5,
                Param = 0xac,
                LoginAck = 0xad,
                ReturnStatus = 0x79,
index 639b417909d12f44ecc8f496129b4d4f699317df..3c7d7afa19c3f50d44992acb3d41809930aec147 100644 (file)
@@ -17,6 +17,7 @@ namespace Mono.Data.TdsClient.Internal {
                Reply = 0x4,
                Cancel = 0x6,
                Logon70 = 0x10,
-               Logoff = 0x71
+               Logoff = 0x71,
+               Capability = 0xe2
        }
 }