Hi,
Par example:
command.Text = "INSER INTO ...";
command.Prepare();
for (int i = 0; i < 10000; i++)
{
// Add some parameter data
command.executeNonQuery();
}
The problem is, this still executes queries and checks results from the
database engine (in my case over the network) for each and every insert.
This slows the process considerably and while the JDBC add- and
executeBatch method below does about 80000 inserts per second, code like
the above snippet only does about 4000 with my current setup.
Thanks for you input.
/Fred
On Sun, 2004-05-23 at 13:34, Carlos Guzm�n �lvarez wrote:
> Hello:
>
> >PreparedStatement statement = connection.prepareStatement("INSERT
> >INTO....");
> >
> > for (int i = 0; i < 1000; i++)
> > {
> > statement.setInt(1,rand.nextInt());
> > statement.addBatch();
> > }
> > statement.executeBatch();
> >
> Maybe you can use parametrized querys and the
> XxCommand.Prepare method ??
>
>
>
>
> --
> Best regards
>
> Carlos Guzm�n �lvarez
> Vigo-Spain
> _______________________________________________
> Mono-list maillist - [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
_______________________________________________
Mono-list maillist - [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list