Hi I am bringing about 100000 records into memory cleaning the data and inserting into a new table. After inserting around 2000 records I get the following exception.
A first chance exception of type 'System.OutOfMemoryException' occurred in Iesi.Collections.DLL A first chance exception of type 'FluentNHibernate.Cfg.FluentConfigurationException' occurred in FluentNHibernate.DLL
I am using Fluent NHibernate. but am not sure if the problem is related to fluent NHibernate itself.
What is the best way to do bulk inserts to the db, I am wondering whether to use stringbuilder and build an sql query instead. Any pointers much appreciated.