DbDataSource.CreateBatch Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a DbBatch that's ready for execution against the DbDataSource.
public:
System::Data::Common::DbBatch ^ CreateBatch();
public System.Data.Common.DbBatch CreateBatch ();
member this.CreateBatch : unit -> System.Data.Common.DbBatch
Public Function CreateBatch () As DbBatch
Returns
A DbBatch that's ready for execution against the DbDataSource.
Remarks
Batches returned from this method are already configured to execute against their originating DbDataSource; their Connection does not need to be set, and doing so will throw an exception.
Since these batches have no explicitly-managed connection, it is not possible to use them with transactions, and trying to set Transaction will throw an exception. To use a transaction, get a connection from OpenConnection and create a command against it.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om