Really like working with linqConnect so far, but I have a couple of long running queries, is it possible to display a progress bar?
I note that the SQLiteConnection class has a RegisterProgressHandler method, but I am at the moment just using the data context created from the database via the Entity Developer passing in a connection string.
Thanks Martin
Using a SQLiteProgressCallbackHander with Linq
-
- Posts: 8
- Joined: Thu 24 Jan 2013 14:44
Re: Using a SQLiteProgressCallbackHander with Linq
You could try doing this in the next way - after creating a DataContext object, get its connection, cast it to SQLiteConnection and then use RegisterProgressHandler/UnRegisterProgressHandler methods. For example:
Please tell us if this helps.
Code: Select all
MainContext.MainDataContext dt = new MainContext.MainDataContext();
SQLiteConnection conn = (SQLiteConnection) dt.Connection;
conn.Open();
conn.RegisterProgressHandler(handler);
....
conn.UnRegisterProgressHandler();