'Declaration
Public Sub AddStatement( _ ByVal sqlStmt As String, _ ByVal cmdParams As DataParameterCollection _ )
public void AddStatement( string sqlStmt, DataParameterCollection cmdParams )
Once added, the statement is rewritten to make the parameter names unique among all the statements. Once added a statement cannot be removed. The entire batch must be discarded and rebuilt.
If the specified provider for this batch returns false from its CanBatchQueries property, the statement will be executed immediately and not added to a batch. No statement will be added to a "batch". Subsequent calls to the Execute Method will not perform any operations against the database and return a -2 for number of rows affected.
If the specified provider returns true from its CanBatchQueries property, this statement will be added to the list of statements to execute in the batch when the Execute Method is called.
IMPORTANT: The UpdateQueryBatch does not commit or rollback the transaction instance. It is the responsibility of the caller to ensure that the transaction is properly set up and finished after the batch is executed.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family