Getting SQL Batch size in ado.net

  • Thread starter Thread starter Venkatesh
  • Start date Start date
V

Venkatesh

HI

How do I get the SQL batch size in ado.net ? SQL Server
has an upper limit on the batch size of (65,536 * Network
Packet Size). If I have a batch that may exceed this
value, I want to check the value, and break the batch into
multiple batches.

Thanks.
 
This is not exposed in ADO.NET (AFAIK). I would measure the size of the
string being executed and go from there. Are these batches sets of INSERT
statements or logic?
It turns out that there are other more efficient ways to handle bulk data
and using ADO.NET is one of the last things you should try.

--
____________________________________
Bill Vaughn
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top