Batch update/insert/delete

18 views
Skip to first unread message

Jan Van Ryswyck

unread,
Mar 21, 2008, 2:32:16 AM3/21/08
to nhusers
Hi all,

Compared to you guys, I'm quite new to NHibernate (but I'm learning).
I'm considering using NHibernate for some WCF services we are
developing that make use of a DB2 database (I've heard someone say on
a podcast that NHibernate was optimized for DB2. I think it was
Oren :-) ). Anyhow, I was wondering if it is possible to batch insert/
update/delete statements for DB2?. We have a table with many records
that can change a lot. One of the scenario's that we need to insert/
update/delete hundreds of records at a time.

If it is not possible to batch these queries, do you guys know any
alternative solutions to accomplish this?

Thanks in advance,

Jan

Ayende Rahien

unread,
Mar 21, 2008, 4:04:20 AM3/21/08
to nhu...@googlegroups.com
Batching support is dependent on the driver that you are using.
If it is possible to batch calls to DB2 from ADO.Net, it would be possible to do so with NH.
Right now only SQL Server (and Oracle, IIRC) has support for it, but it is pretty easy to build (you need to inherit from AbstractBatcher and handle AddToBatch and ExecuteBatch()

Jan Van Ryswyck

unread,
Mar 21, 2008, 7:43:03 AM3/21/08
to nhusers
Thanks for the quick reponse. I'll give it try.

Kind regards,

Jan

On Mar 21, 9:04 am, "Ayende Rahien" <aye...@ayende.com> wrote:
> Batching support is dependent on the driver that you are using.
> If it is possible to batch calls to DB2 from ADO.Net, it would be possible
> to do so with NH.
> Right now only SQL Server (and Oracle, IIRC) has support for it, but it is
> pretty easy to build (you need to inherit from AbstractBatcher and handle
> AddToBatch and ExecuteBatch()
>
Reply all
Reply to author
Forward
0 new messages