@@ -27,6 +27,7 @@ public sealed class AseCommand : DbCommand
2727 private string _commandText ;
2828 private UpdateRowSource _updatedRowSource ;
2929 private bool ? _namedParameters ;
30+ internal FormatItem FormatItem { get ; set ; }
3031
3132 /// <summary>
3233 /// Constructor function for an <see cref="AseCommand"/> instance.
@@ -42,10 +43,8 @@ public AseCommand()
4243 /// Note: the instance will not be initialised with an AseConnection; before use this must be supplied.
4344 /// </summary>
4445 /// <param name="commandText">The command text to execute</param>
45- public AseCommand ( string commandText )
46+ public AseCommand ( string commandText ) : this ( )
4647 {
47- AseParameters = new AseParameterCollection ( ) ;
48-
4948 CommandText = commandText ;
5049 }
5150
@@ -54,14 +53,10 @@ public AseCommand(string commandText)
5453 /// </summary>
5554 /// <param name="commandText">The command text to execute</param>
5655 /// <param name="connection">The connection upon which to execute</param>
57- public AseCommand ( string commandText , AseConnection connection )
56+ public AseCommand ( string commandText , AseConnection connection ) : this ( commandText )
5857 {
5958 _connection = connection ;
6059 _transaction = connection . Transaction ;
61-
62- AseParameters = new AseParameterCollection ( ) ;
63-
64- CommandText = commandText ;
6560 }
6661
6762 /// <summary>
@@ -70,23 +65,13 @@ public AseCommand(string commandText, AseConnection connection)
7065 /// <param name="commandText">The command text to execute</param>
7166 /// <param name="connection">The connection upon which to execute</param>
7267 /// <param name="transaction">The transaction within which to execute</param>
73- public AseCommand ( string commandText , AseConnection connection , AseTransaction transaction )
68+ public AseCommand ( string commandText , AseConnection connection , AseTransaction transaction ) : this ( commandText , connection )
7469 {
75- _connection = connection ;
7670 _transaction = transaction ;
77-
78- AseParameters = new AseParameterCollection ( ) ;
79-
80- CommandText = commandText ;
8171 }
8272
83- internal AseCommand ( AseConnection connection )
84- {
85- _connection = connection ;
86- _transaction = connection . Transaction ;
87-
88- AseParameters = new AseParameterCollection ( ) ;
89- }
73+ internal AseCommand ( AseConnection connection ) : this ( string . Empty , connection , connection . Transaction )
74+ { }
9075
9176 /// <summary>
9277 /// Tries to cancel the execution of a <see cref="AseCommand" />.
@@ -131,6 +116,7 @@ protected override DbParameter CreateDbParameter()
131116 return CreateParameter ( ) ;
132117 }
133118
119+
134120 /// <summary>
135121 /// Executes a Transact-SQL statement against the connection and returns the number of rows affected.
136122 /// </summary>
0 commit comments