NHibernate doesn't do anything you can't do with 4 million lines of ADO.NETcalls. Firing events based on db updates from other apps is way outside this scope.
I assume you are using a file-based SQLite database. Just watch the last updated stamp on the database file, then fire your refresh code. On Thu, Jul 22, 2010 at 10:10 AM, Tom Bushell <[email protected]> wrote: > I have two C# programs that share a single SQLite database file. > > One program (let's call it Writer) writes new data to the database. > The other program (Reader) reads it. Both programs use Fluent > NHibernate and System.Data.SQLite to access the DB. > > Currently, I've just got a big Refresh button on my Reader program, > and the user has to click it to get any new data that was written to > the DB since the last refresh. This works, but is hardly elegant. > > Is there any way to get NHibernate to fire an event in the Reader > program when the DB is updated by Writer, so I can automatically > present new data to the user? (I looked at the NH docs for > Interceptors and Events, but it was not clear if these would do what I > want) > > Or, is there a good way to poll for updates using NH? > > Failing an NH solution, can I do something similar with > System.Data.SQLite, or via another lower level mechanism? > > Thanks, > > -Tom Bushell > > (Note: I also asked this on Stack Overflow - > > http://stackoverflow.com/questions/3303843/can-nhibernate-detect-when-another-program-has-written-new-data-to-a-shared-sqlit > ) > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en.
