Run in transaction, set FlushMode to Commit. Tuna Toksöz http://tunatoksoz.com http://twitter.com/tehlike
Typos included to enhance the readers attention! On Thu, Feb 12, 2009 at 11:50 PM, M Kenyon II <[email protected]> wrote: > > One of the pages I'm working with does an update/insert to the > database. We give the code a range of numbers and it creates records > for each of them. > > However, it times out for ranges above 1000 (more than 1000 records). > > This is how it was written: > Dim CitationTotal As Integer = 0 > For Number As Integer = > CitationStartNumber To CitationEndNumber.Value > If CitationAdd(CitationType, Number, > District) Then CitationTotal += 1 > Next > > Castle.ActiveRecord.SessionScope.Current.Flush() > Page.DisplaySearchMessages(String.Format > ("{0} Records were added between Citation # {1}{2} and Citation # {1} > {3}.", CitationTotal, CitationType, CitationStartNumber, > CitationEndNumber), New List(Of String)) > > Is there a way to do this better, or more efficiently? > > If we really have a long running query, is there a way to have the > page be in a wait state that refreshes every so often (javascript > reload kind of thing) waiting for the process to run? (I've seen this > with ASP .Net) > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
