It's not possible to combine queries within one OleDbCommand
. If possible, make a stored procedure, otherwise you'll have to stick to firing many OleDbCommands at the server.
It's worth noting, though, that connection pooling is enabled for OleDbConnection
by default:
When you use the .NET Framework Data
Provider for OLE DB, you do not have
to enable connection pooling because
the provider manages this
automatically.
EDIT:
Try something like this:
INSERT INTO myTable ( Column1, Column2, Column3 )
SELECT 'Value1', 1, 'Value3'
UNION
SELECT 'Value1', 2, 'Value3'
UNION
SELECT 'Value1', 3, 'Value3'
UNION
SELECT 'Value1', 4, 'Value3'
Depending on which OleDb provider you're connecting to, you might be able to use this. But beware, it might be as slow as inserting records one by one anyway.