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
20 internal TdsCommandInternal command;
28 command = new TdsCommandInternal ();
31 #endregion // Constructors
35 public string CommandText {
36 get { return command.CommandText; }
37 set { command.CommandText = value; }
40 public int CommandTimeout {
41 get { return command.CommandTimeout; }
42 set { command.CommandTimeout = value; }
45 public CommandType CommandType {
46 get { return command.CommandType; }
47 set { command.CommandType = value; }
50 IDbConnection IDbCommand.Connection {
51 get { return ((IDbCommand) command).Connection; }
52 set { ((IDbCommand) command).Connection = value; }
55 IDataParameterCollection IDbCommand.Parameters {
56 get { return ((IDbCommand) command).Parameters; }
59 IDbTransaction IDbCommand.Transaction {
60 get { return ((IDbCommand) command).Transaction; }
61 set { ((IDbCommand) command).Transaction = value; }
64 public UpdateRowSource UpdatedRowSource {
65 get { return command.UpdatedRowSource; }
66 set { command.UpdatedRowSource = value; }
69 #endregion // Properties
78 IDbDataParameter IDbCommand.CreateParameter ()
80 return ((IDbCommand) command).CreateParameter ();
83 public int ExecuteNonQuery ()
85 return command.ExecuteNonQuery ();
88 IDataReader IDbCommand.ExecuteReader ()
90 return ((IDbCommand) command).ExecuteReader ();
93 IDataReader IDbCommand.ExecuteReader (CommandBehavior behavior)
95 return ((IDbCommand) command).ExecuteReader (behavior);
98 public object ExecuteScalar ()
100 return command.ExecuteScalar ();
104 object ICloneable.Clone()
106 throw new NotImplementedException ();
109 public void Prepare ()
114 #endregion // Methods