Command Batching in ADO.Net 2.0

time to read 2 min | 224 words

I got one question about this. How am I supposed to do this?

No, using a data adapter is not an option, I want to create my own commands and batch them. Searching gave no answer, and Reflecting over the relevant classes bring me to a whole mess of internal classes and methods in System.Data.

Any ideas?

I would really like it to be DB agnostic (or be able to query if I can batch or not), but even something for SQL Server only will be helpful.

It looks like this is not supported :-(.

We dont have batching at command level for .Net Framework version 2.0. Batching is only supported at the Adapter level. Meaning all the update, insert and delete commands on the adapter are the only ones that get batched. Hope this helps.

This is extremely annoying. Why does Microsoft insist of interalizing everything? Here is a perfectly good functionality that I can't access, reducing me to the bad way of concating queries if I need to do it.

Yuck!