This repository was archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathSystem.Data.SqlClient.SqlCommand.cs
More file actions
690 lines (666 loc) · 29.2 KB
/
System.Data.SqlClient.SqlCommand.cs
File metadata and controls
690 lines (666 loc) · 29.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
// CodeContracts
//
// Copyright (c) Microsoft Corporation
//
// All rights reserved.
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Xml;
using System.Diagnostics.Contracts;
namespace System.Data.SqlClient
{
// Summary:
// Represents a Transact-SQL statement or stored procedure to execute against
// a SQL Server database. This class cannot be inherited.
//[Designer("Microsoft.VSDesigner.Data.VS.SqlCommandDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
//[DefaultEvent("RecordsAffected")]
//[ToolboxItem(true)]
public /*sealed*/ class SqlCommand // : DbCommand, ICloneable
{
// Summary:
// Initializes a new instance of the System.Data.SqlClient.SqlCommand class.
//public SqlCommand();
//
// Summary:
// Initializes a new instance of the System.Data.SqlClient.SqlCommand class
// with the text of the query.
//
// Parameters:
// cmdText:
// The text of the query.
//public SqlCommand(string cmdText);
//
// Summary:
// Initializes a new instance of the System.Data.SqlClient.SqlCommand class
// with the text of the query and a System.Data.SqlClient.SqlConnection.
//
// Parameters:
// cmdText:
// The text of the query.
//
// connection:
// A System.Data.SqlClient.SqlConnection that represents the connection to an
// instance of SQL Server.
//public SqlCommand(string cmdText, SqlConnection connection);
//
// Summary:
// Initializes a new instance of the System.Data.SqlClient.SqlCommand class
// with the text of the query, a System.Data.SqlClient.SqlConnection, and the
// System.Data.SqlClient.SqlTransaction.
//
// Parameters:
// cmdText:
// The text of the query.
//
// connection:
// A System.Data.SqlClient.SqlConnection that represents the connection to an
// instance of SQL Server.
//
// transaction:
// The System.Data.SqlClient.SqlTransaction in which the System.Data.SqlClient.SqlCommand
// executes.
//public SqlCommand(string cmdText, SqlConnection connection, SqlTransaction transaction);
// Summary:
// Gets or sets the Transact-SQL statement, table name or stored procedure to
// execute at the data source.
//
// Returns:
// The Transact-SQL statement or stored procedure to execute. The default is
// an empty string.
//[ResDescription("DbCommand_CommandText")]
//[ResCategory("DataCategory_Data")]
//[RefreshProperties(RefreshProperties.All)]
//[Editor("Microsoft.VSDesigner.Data.SQL.Design.SqlCommandTextEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
//[DefaultValue("")]
//public override string CommandText { get; set; }
//
// Summary:
// Gets or sets the wait time before terminating the attempt to execute a command
// and generating an error.
//
// Returns:
// The time in seconds to wait for the command to execute. The default is 30
// seconds.
//[ResCategory("DataCategory_Data")]
//[ResDescription("DbCommand_CommandTimeout")]
//public override int CommandTimeout { get; set; }
//
// Summary:
// Gets or sets a value indicating how the System.Data.SqlClient.SqlCommand.CommandText
// property is to be interpreted.
//
// Returns:
// One of the System.Data.CommandType values. The default is Text.
//
// Exceptions:
// System.ArgumentException:
// The value was not a valid System.Data.CommandType.
//[RefreshProperties(RefreshProperties.All)]
//[ResCategory("DataCategory_Data")]
//[ResDescription("DbCommand_CommandType")]
//public override CommandType CommandType { get; set; }
//
// Summary:
// Gets or sets the System.Data.SqlClient.SqlConnection used by this instance
// of the System.Data.SqlClient.SqlCommand.
//
// Returns:
// The connection to a data source. The default value is null.
//
// Exceptions:
// System.InvalidOperationException:
// The System.Data.SqlClient.SqlCommand.Connection property was changed while
// a transaction was in progress.
//[Editor("Microsoft.VSDesigner.Data.Design.DbConnectionEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
//[ResDescription("DbCommand_Connection")]
//[DefaultValue("")]
//[ResCategory("DataCategory_Data")]
//public SqlConnection Connection { get; set; }
//protected override DbConnection DbConnection { get; set; }
//protected override DbParameterCollection DbParameterCollection { get; }
//protected override DbTransaction DbTransaction { get; set; }
//
// Summary:
// Gets or sets a value indicating whether the command object should be visible
// in a Windows Form Designer control.
//
// Returns:
// A value indicating whether the command object should be visible in a control.
// The default is true.
//[EditorBrowsable(EditorBrowsableState.Never)]
//[Browsable(false)]
//[DesignOnly(true)]
//[DefaultValue(true)]
//public override bool DesignTimeVisible { get; set; }
//
// Summary:
// Gets or sets a value that specifies the System.Data.Sql.SqlNotificationRequest
// object bound to this command.
//
// Returns:
// When set to null (default), no notification should be requested.
//[Browsable(false)]
//[ResDescription("SqlCommand_Notification")]
//[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
//[ResCategory("DataCategory_Notification")]
//public SqlNotificationRequest Notification { get; set; }
//
// Summary:
// Gets or sets a value indicating whether the application should automatically
// receive query notifications from a common System.Data.SqlClient.SqlDependency
// object.
//
// Returns:
// true if the application should automatically receive query notifications;
// otherwise false. The default value is true.
//[ResDescription("SqlCommand_NotificationAutoEnlist")]
//[DefaultValue(true)]
//[ResCategory("DataCategory_Notification")]
//public bool NotificationAutoEnlist { get; set; }
//
// Summary:
// Gets the System.Data.SqlClient.SqlParameterCollection.
//
// Returns:
// The parameters of the Transact-SQL statement or stored procedure. The default
// is an empty collection.
//[ResCategory("DataCategory_Data")]
//[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
//[ResDescription("DbCommand_Parameters")]
public SqlParameterCollection Parameters
{
get
{
Contract.Ensures(Contract.Result<SqlParameterCollection>() != null);
return default(SqlParameterCollection);
}
}
//
// Summary:
// Gets or sets the System.Data.SqlClient.SqlTransaction within which the System.Data.SqlClient.SqlCommand
// executes.
//
// Returns:
// The System.Data.SqlClient.SqlTransaction. The default value is null.
//[Browsable(false)]
//[ResDescription("DbCommand_Transaction")]
//[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
//public SqlTransaction Transaction { get; set; }
//
// Summary:
// Gets or sets how command results are applied to the System.Data.DataRow when
// used by the Update method of the System.Data.Common.DbDataAdapter.
//
// Returns:
// One of the System.Data.UpdateRowSource values.
//[ResDescription("DbCommand_UpdatedRowSource")]
//[ResCategory("DataCategory_Update")]
//public override UpdateRowSource UpdatedRowSource { get; set; }
// Summary:
// Occurs when the execution of a Transact-SQL statement completes.
//[ResCategory("DataCategory_StatementCompleted")]
//[ResDescription("DbCommand_StatementCompleted")]
//public event StatementCompletedEventHandler StatementCompleted;
// Summary:
// Initiates the asynchronous execution of the Transact-SQL statement or stored
// procedure that is described by this System.Data.SqlClient.SqlCommand.
//
// Returns:
// An System.IAsyncResult that can be used to poll or wait for results, or both;
// this value is also needed when invoking System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult),
// which returns the number of affected rows.
//
// Exceptions:
// System.Data.SqlClient.SqlException:
// Any error that occurred while executing the command text.
//
// System.InvalidOperationException:
// The name/value pair "Asynchronous Processing=true" was not included within
// the connection string defining the connection for this System.Data.SqlClient.SqlCommand.
public IAsyncResult BeginExecuteNonQuery()
{
Contract.Ensures(Contract.Result<IAsyncResult>() != null);
return default(IAsyncResult);
}
//
// Summary:
// Initiates the asynchronous execution of the Transact-SQL statement or stored
// procedure that is described by this System.Data.SqlClient.SqlCommand, given
// a callback procedure and state information.
//
// Parameters:
// callback:
// An System.AsyncCallback delegate that is invoked when the command's execution
// has completed. Pass null (Nothing in Microsoft Visual Basic) to indicate
// that no callback is required.
//
// stateObject:
// A user-defined state object that is passed to the callback procedure. Retrieve
// this object from within the callback procedure using the System.IAsyncResult.AsyncState
// property.
//
// Returns:
// An System.IAsyncResult that can be used to poll or wait for results, or both;
// this value is also needed when invoking System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult),
// which returns the number of affected rows.
//
// Exceptions:
// System.Data.SqlClient.SqlException:
// Any error that occurred while executing the command text.
//
// System.InvalidOperationException:
// The name/value pair "Asynchronous Processing=true" was not included within
// the connection string defining the connection for this System.Data.SqlClient.SqlCommand.
public IAsyncResult BeginExecuteNonQuery(AsyncCallback callback, object stateObject)
{
Contract.Ensures(Contract.Result<IAsyncResult>() != null);
return default(IAsyncResult);
}
//
// Summary:
// Initiates the asynchronous execution of the Transact-SQL statement or stored
// procedure that is described by this System.Data.SqlClient.SqlCommand, and
// retrieves one or more result sets from the server.
//
// Returns:
// An System.IAsyncResult that can be used to poll or wait for results, or both;
// this value is also needed when invoking System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult),
// which returns a System.Data.SqlClient.SqlDataReader instance that can be
// used to retrieve the returned rows.
//
// Exceptions:
// System.Data.SqlClient.SqlException:
// Any error that occurred while executing the command text.
//
// System.InvalidOperationException:
// The name/value pair "Asynchronous Processing=true" was not included within
// the connection string defining the connection for this System.Data.SqlClient.SqlCommand.
public IAsyncResult BeginExecuteReader()
{
Contract.Ensures(Contract.Result<IAsyncResult>() != null);
return default(IAsyncResult);
}
//
// Summary:
// Initiates the asynchronous execution of the Transact-SQL statement or stored
// procedure that is described by this System.Data.SqlClient.SqlCommand using
// one of the System.Data.CommandBehavior values.
//
// Parameters:
// behavior:
// One of the System.Data.CommandBehavior values, indicating options for statement
// execution and data retrieval.
//
// Returns:
// An System.IAsyncResult that can be used to poll, wait for results, or both;
// this value is also needed when invoking System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult),
// which returns a System.Data.SqlClient.SqlDataReader instance that can be
// used to retrieve the returned rows.
//
// Exceptions:
// System.Data.SqlClient.SqlException:
// Any error that occurred while executing the command text.
//
// System.InvalidOperationException:
// The name/value pair "Asynchronous Processing=true" was not included within
// the connection string defining the connection for this System.Data.SqlClient.SqlCommand.
public IAsyncResult BeginExecuteReader(CommandBehavior behavior)
{
Contract.Ensures(Contract.Result<IAsyncResult>() != null);
return default(IAsyncResult);
}
//
// Summary:
// Initiates the asynchronous execution of the Transact-SQL statement or stored
// procedure that is described by this System.Data.SqlClient.SqlCommand and
// retrieves one or more result sets from the server, given a callback procedure
// and state information.
//
// Parameters:
// callback:
// An System.AsyncCallback delegate that is invoked when the command's execution
// has completed. Pass null (Nothing in Microsoft Visual Basic) to indicate
// that no callback is required.
//
// stateObject:
// A user-defined state object that is passed to the callback procedure. Retrieve
// this object from within the callback procedure using the System.IAsyncResult.AsyncState
// property.
//
// Returns:
// An System.IAsyncResult that can be used to poll, wait for results, or both;
// this value is also needed when invoking System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult),
// which returns a System.Data.SqlClient.SqlDataReader instance which can be
// used to retrieve the returned rows.
//
// Exceptions:
// System.Data.SqlClient.SqlException:
// Any error that occurred while executing the command text.
//
// System.InvalidOperationException:
// The name/value pair "Asynchronous Processing=true" was not included within
// the connection string defining the connection for this System.Data.SqlClient.SqlCommand.
public IAsyncResult BeginExecuteReader(AsyncCallback callback, object stateObject)
{
Contract.Ensures(Contract.Result<IAsyncResult>() != null);
return default(IAsyncResult);
}
//
// Summary:
// Initiates the asynchronous execution of the Transact-SQL statement or stored
// procedure that is described by this System.Data.SqlClient.SqlCommand, using
// one of the CommandBehavior values, and retrieving one or more result sets
// from the server, given a callback procedure and state information.
//
// Parameters:
// callback:
// An System.AsyncCallback delegate that is invoked when the command's execution
// has completed. Pass null (Nothing in Microsoft Visual Basic) to indicate
// that no callback is required.
//
// stateObject:
// A user-defined state object that is passed to the callback procedure. Retrieve
// this object from within the callback procedure using the System.IAsyncResult.AsyncState
// property.
//
// behavior:
// One of the System.Data.CommandBehavior values, indicating options for statement
// execution and data retrieval.
//
// Returns:
// An System.IAsyncResult that can be used to poll or wait for results, or both;
// this value is also needed when invoking System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult),
// which returns a System.Data.SqlClient.SqlDataReader instance which can be
// used to retrieve the returned rows.
//
// Exceptions:
// System.Data.SqlClient.SqlException:
// Any error that occurred while executing the command text.
//
// System.InvalidOperationException:
// The name/value pair "Asynchronous Processing=true" was not included within
// the connection string defining the connection for this System.Data.SqlClient.SqlCommand.
public IAsyncResult BeginExecuteReader(AsyncCallback callback, object stateObject, CommandBehavior behavior)
{
Contract.Ensures(Contract.Result<IAsyncResult>() != null);
return default(IAsyncResult);
}
//
// Summary:
// Initiates the asynchronous execution of the Transact-SQL statement or stored
// procedure that is described by this System.Data.SqlClient.SqlCommand and
// returns results as an System.Xml.XmlReader object.
//
// Returns:
// An System.IAsyncResult that can be used to poll or wait for results, or both;
// this value is also needed when invoking EndExecuteXmlReader, which returns
// a single XML value.
//
// Exceptions:
// System.Data.SqlClient.SqlException:
// Any error that occurred while executing the command text.
//
// System.InvalidOperationException:
// The name/value pair "Asynchronous Processing=true" was not included within
// the connection string defining the connection for this System.Data.SqlClient.SqlCommand.
public IAsyncResult BeginExecuteXmlReader()
{
Contract.Ensures(Contract.Result<IAsyncResult>() != null);
return default(IAsyncResult);
}
//
// Summary:
// Initiates the asynchronous execution of the Transact-SQL statement or stored
// procedure that is described by this System.Data.SqlClient.SqlCommand and
// returns results as an System.Xml.XmlReader object, using a callback procedure.
//
// Parameters:
// callback:
// An System.AsyncCallback delegate that is invoked when the command's execution
// has completed. Pass null (Nothing in Microsoft Visual Basic) to indicate
// that no callback is required.
//
// stateObject:
// A user-defined state object that is passed to the callback procedure. Retrieve
// this object from within the callback procedure using the System.IAsyncResult.AsyncState
// property.
//
// Returns:
// An System.IAsyncResult that can be used to poll, wait for results, or both;
// this value is also needed when the System.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)
// is called, which returns the results of the command as XML.
//
// Exceptions:
// System.Data.SqlClient.SqlException:
// Any error that occurred while executing the command text.
//
// System.InvalidOperationException:
// The name/value pair "Asynchronous Processing=true" was not included within
// the connection string defining the connection for this System.Data.SqlClient.SqlCommand.
public IAsyncResult BeginExecuteXmlReader(AsyncCallback callback, object stateObject)
{
Contract.Ensures(Contract.Result<IAsyncResult>() != null);
return default(IAsyncResult);
}
//
// Summary:
// Tries to cancel the execution of a System.Data.SqlClient.SqlCommand.
//public override void Cancel();
//
// Summary:
// Creates a new System.Data.SqlClient.SqlCommand object that is a copy of the
// current instance.
//
// Returns:
// A new System.Data.SqlClient.SqlCommand object that is a copy of this instance.
public SqlCommand Clone()
{
Contract.Ensures(Contract.Result<SqlCommand>() != null);
return default(SqlCommand);
}
//protected override DbParameter CreateDbParameter();
//
// Summary:
// Creates a new instance of a System.Data.SqlClient.SqlParameter object.
//
// Returns:
// A System.Data.SqlClient.SqlParameter object.
public SqlParameter CreateParameter()
{
Contract.Ensures(Contract.Result<SqlParameter>() != null);
return default(SqlParameter);
}
//protected override void Dispose(bool disposing);
//
// Summary:
// Finishes asynchronous execution of a Transact-SQL statement.
//
// Parameters:
// asyncResult:
// The System.IAsyncResult returned by the call to System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery().
//
// Returns:
// The number of rows affected (the same behavior as System.Data.SqlClient.SqlCommand.ExecuteNonQuery()).
//
// Exceptions:
// System.ArgumentException:
// asyncResult parameter is null (Nothing in Microsoft Visual Basic)
//
// System.InvalidOperationException:
// System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)
// was called more than once for a single command execution, or the method was
// mismatched against its execution method (for example, the code called System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(System.IAsyncResult)
// to complete execution of a call to System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader().
public int EndExecuteNonQuery(IAsyncResult asyncResult)
{
Contract.Requires(asyncResult != null);
return default(int);
}
//
// Summary:
// Finishes asynchronous execution of a Transact-SQL statement, returning the
// requested System.Data.SqlClient.SqlDataReader.
//
// Parameters:
// asyncResult:
// The System.IAsyncResult returned by the call to System.Data.SqlClient.SqlCommand.BeginExecuteReader().
//
// Returns:
// A System.Data.SqlClient.SqlDataReader object that can be used to retrieve
// the requested rows.
//
// Exceptions:
// System.ArgumentException:
// asyncResult parameter is null (Nothing in Microsoft Visual Basic)
//
// System.InvalidOperationException:
// System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult) was
// called more than once for a single command execution, or the method was mismatched
// against its execution method (for example, the code called System.Data.SqlClient.SqlCommand.EndExecuteReader(System.IAsyncResult)
// to complete execution of a call to System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader().
public SqlDataReader EndExecuteReader(IAsyncResult asyncResult)
{
Contract.Requires(asyncResult != null);
return default(SqlDataReader);
}
//
// Summary:
// Finishes asynchronous execution of a Transact-SQL statement, returning the
// requested data as XML.
//
// Parameters:
// asyncResult:
// The System.IAsyncResult returned by the call to System.Data.SqlClient.SqlCommand.BeginExecuteXmlReader().
//
// Returns:
// An System.Xml.XmlReader object that can be used to fetch the resulting XML
// data.
//
// Exceptions:
// System.ArgumentException:
// asyncResult parameter is null (Nothing in Microsoft Visual Basic)
//
// System.InvalidOperationException:
// System.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)
// was called more than once for a single command execution, or the method was
// mismatched against its execution method (for example, the code called System.Data.SqlClient.SqlCommand.EndExecuteXmlReader(System.IAsyncResult)
// to complete execution of a call to System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery().
public XmlReader EndExecuteXmlReader(IAsyncResult asyncResult)
{
Contract.Requires(asyncResult != null);
Contract.Ensures(Contract.Result<XmlReader>() != null);
return default(XmlReader);
}
//protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior);
//
// Summary:
// Executes a Transact-SQL statement against the connection and returns the
// number of rows affected.
//
// Returns:
// The number of rows affected.
//
// Exceptions:
// System.Data.SqlClient.SqlException:
// An exception occurred while executing the command against a locked row. This
// exception is not generated when you are using Microsoft .NET Framework version
// 1.0.
//public override int ExecuteNonQuery();
//
// Summary:
// Sends the System.Data.SqlClient.SqlCommand.CommandText to the System.Data.SqlClient.SqlCommand.Connection
// and builds a System.Data.SqlClient.SqlDataReader.
//
// Returns:
// A System.Data.SqlClient.SqlDataReader object.
//
// Exceptions:
// System.Data.SqlClient.SqlException:
// An exception occurred while executing the command against a locked row. This
// exception is not generated when you are using Microsoft .NET Framework version
// 1.0.
//
// System.InvalidOperationException:
// The current state of the connection is closed. System.Data.SqlClient.SqlCommand.ExecuteReader()
// requires an open System.Data.SqlClient.SqlConnection.
public SqlDataReader ExecuteReader()
{
Contract.Ensures(Contract.Result<SqlDataReader >() != null);
return default(SqlDataReader);
}
//
// Summary:
// Sends the System.Data.SqlClient.SqlCommand.CommandText to the System.Data.SqlClient.SqlCommand.Connection,
// and builds a System.Data.SqlClient.SqlDataReader using one of the System.Data.CommandBehavior
// values.
//
// Parameters:
// behavior:
// One of the System.Data.CommandBehavior values.
//
// Returns:
// A System.Data.SqlClient.SqlDataReader object.
public SqlDataReader ExecuteReader(CommandBehavior behavior)
{
Contract.Ensures(Contract.Result<SqlDataReader>() != null);
return default(SqlDataReader);
}
//
// Summary:
// Executes the query, and returns the first column of the first row in the
// result set returned by the query. Additional columns or rows are ignored.
//
// Returns:
// The first column of the first row in the result set, or a null reference
// (Nothing in Visual Basic) if the result set is empty.
//
// Exceptions:
// System.Data.SqlClient.SqlException:
// An exception occurred while executing the command against a locked row. This
// exception is not generated when you are using Microsoft .NET Framework version
// 1.0.
//public override object ExecuteScalar();
//
// Summary:
// Sends the System.Data.SqlClient.SqlCommand.CommandText to the System.Data.SqlClient.SqlCommand.Connection
// and builds an System.Xml.XmlReader object.
//
// Returns:
// An System.Xml.XmlReader object.
//
// Exceptions:
// System.Data.SqlClient.SqlException:
// An exception occurred while executing the command against a locked row. This
// exception is not generated when you are using Microsoft .NET Framework version
// 1.0.
public XmlReader ExecuteXmlReader()
{
Contract.Ensures(Contract.Result<XmlReader>() != null);
return default(XmlReader);
}
//
// Summary:
// Creates a prepared version of the command on an instance of SQL Server.
//
// Exceptions:
// System.InvalidOperationException:
// The System.Data.SqlClient.SqlCommand.Connection is not set.-or- The System.Data.SqlClient.SqlCommand.Connection
// is not System.Data.SqlClient.SqlConnection.Open().
//public override void Prepare();
//
// Summary:
// Resets the System.Data.SqlClient.SqlCommand.CommandTimeout property to its
// default value.
//public void ResetCommandTimeout();
}
}