Hi,
I am trying to bulk inserts using stateless session.
I enabled batch size by: cfg.SetProperty("adonet.batch_size", "1")

Ny Nh code is:
public void SaveBulkEvents(List<EventStorageObject> eventsToSave)
        {
            StatelessSession.SetBatchSize(eventsToSave.Count);
            
            foreach (EventStorageObject eventToSave in eventsToSave)
            {
                eventToSave.TimeStamp = 
RepositoryUtils.FixDateTime(eventToSave.TimeStamp);
                StatelessSession.Insert(eventToSave);
            }
        }

The error I get is: System.NotSupportedException: No batch size was defined 
for the session factory, batching is disabled. Set adonet.batch_size = 1 to 
enable batching.

Does bulk insert work on Sql Server Ce?

Thanks,
Haimon.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to