#region Constructors
+ [Obsolete ("Use the constructor that receives a lifetime parameter")]
public Tds80 (string server, int port)
- : this (server, port, 512, 15)
+ : this (server, port, 512, 15, 0)
{
}
+ [Obsolete ("Use the constructor that receives a lifetime parameter")]
public Tds80 (string server, int port, int packetSize, int timeout)
- : base (server, port, packetSize, timeout, Version)
+ : base (server, port, packetSize, timeout, 0, Version)
+ {
+ }
+
+ public Tds80 (string server, int port, int lifetime)
+ : this (server, port, 512, 15, lifetime)
+ {
+ }
+
+ public Tds80 (string server, int port, int packetSize, int timeout, int lifeTime)
+ : base (server, port, packetSize, timeout, lifeTime, Version)
{
}
protected override byte[] ClientVersion {
get { return new byte[] {0x00, 0x0, 0x0, 0x71};}
}
+ protected override byte Precision {
+ get { return 38; }
+ }
+
#endregion // Properties
#region Methods
ExecuteQuery (sql, timeout, wantResults);
}
}
+
+ public override void ExecPrepared (string commandText, TdsMetaParameterCollection parameters, int timeout, bool wantResults)
+ {
+ Parameters = parameters;
+ // We are connected to a Sql 7.0 server
+ if (TdsVersion < TdsVersion.tds80 ||
+ Parameters == null || Parameters.Count < 1) {
+ base.ExecPrepared (commandText, parameters, timeout, wantResults);
+ return;
+ }
+ TdsMetaParameterCollection parms = new TdsMetaParameterCollection ();
+ parms.Add (new TdsMetaParameter ("@Handle", "int", Int32.Parse (commandText)));
+ foreach (TdsMetaParameter parm in Parameters)
+ parms.Add (parm);
+
+ ExecRPC ("sp_execute", parms, timeout, wantResults);
+ }
#endregion // Methods
}