2 // Mono.Data.TdsClient.TdsCommand.cs
5 // Tim Coleman (tim@timcoleman.com)
7 // Copyright (C) 2002 Tim Coleman
10 using Mono.Data.TdsClient.Internal;
12 using System.ComponentModel;
15 namespace Mono.Data.TdsClient {
16 public class TdsCommand : Component, ICloneable, IDbCommand
22 CommandType commandType;
23 TdsConnection connection;
24 TdsParameterCollection parameters;
25 TdsTransaction transaction;
35 #endregion // Constructors
39 public string CommandText {
40 get { return commandText; }
41 set { commandText = value; }
44 public int CommandTimeout {
45 get { return commandTimeout; }
46 set { commandTimeout = value; }
49 public CommandType CommandType {
50 get { return commandType; }
51 set { commandType = value; }
54 public TdsConnection Connection {
55 get { return connection; }
56 set { connection = value; }
59 IDbConnection IDbCommand.Connection {
60 get { return Connection; }
62 if (!(value is TdsConnection))
63 throw new ArgumentException ();
64 Connection = (TdsConnection) value;
68 IDataParameterCollection IDbCommand.Parameters {
69 get { return Parameters; }
72 IDbTransaction IDbCommand.Transaction {
73 get { return Transaction; }
75 if (!(value is TdsTransaction))
76 throw new ArgumentException ();
77 Transaction = (TdsTransaction) value;
81 public TdsParameterCollection Parameters {
82 get { return parameters; }
85 public TdsTransaction Transaction {
86 get { return transaction; }
87 set { transaction = value; }
91 public UpdateRowSource UpdatedRowSource {
92 get { throw new NotImplementedException (); }
93 set { throw new NotImplementedException (); }
96 #endregion // Properties
101 public void Cancel ()
103 throw new NotImplementedException ();
107 TdsParameter CreateParameter ()
109 throw new NotImplementedException ();
113 public int ExecuteNonQuery ()
115 throw new NotImplementedException ();
118 public TdsDataReader ExecuteReader ()
120 return ExecuteReader (CommandBehavior.Default);
124 public TdsDataReader ExecuteReader (CommandBehavior behavior)
126 throw new NotImplementedException ();
130 public object ExecuteScalar ()
132 throw new NotImplementedException ();
136 object ICloneable.Clone()
138 throw new NotImplementedException ();
141 IDbDataParameter IDbCommand.CreateParameter ()
143 return CreateParameter ();
146 IDataReader IDbCommand.ExecuteReader ()
148 return ExecuteReader ();
151 IDataReader IDbCommand.ExecuteReader (CommandBehavior behavior)
153 return ExecuteReader (behavior);
157 public void Prepare ()
159 throw new NotImplementedException ();
163 internal void SkipToEnd ()
166 while (GetMoreResults (tds, false) || updateCount != 1);
170 #endregion // Methods