G
Guest
I keep a DataSet in a singleton class that I use to keep various global data
for a CF app. I bring down data with a webservice as a 2nd dataset, and
merge it into the global dataset (adding or updating records as needed). The
act of downloading them requires me to change a status-field in the affected
rows, so when it's all done I do an AcceptChanges so I'm ready for "real"
changes the user might input.
This works great when done on a primary thread for the initial fetch of
data. And it works great ONCE when invoked on a background thread that looks
for new data every few minutes. But after that first time, it goes bye-bye
on the AcceptChanges call. It does this in the debugger, but it also when
not in the debugger (I surround the call with a couple messageboxes and only
see the 1st one). I also have the whole block of code in a try/catch which
never triggers the catch.
Any thoughts on what could possibly make AcceptChanges on a 2nd thread
simply hang the app without throwing an exception? I've done this with
various records so I don't think it's the data content.
for a CF app. I bring down data with a webservice as a 2nd dataset, and
merge it into the global dataset (adding or updating records as needed). The
act of downloading them requires me to change a status-field in the affected
rows, so when it's all done I do an AcceptChanges so I'm ready for "real"
changes the user might input.
This works great when done on a primary thread for the initial fetch of
data. And it works great ONCE when invoked on a background thread that looks
for new data every few minutes. But after that first time, it goes bye-bye
on the AcceptChanges call. It does this in the debugger, but it also when
not in the debugger (I surround the call with a couple messageboxes and only
see the 1st one). I also have the whole block of code in a try/catch which
never triggers the catch.
Any thoughts on what could possibly make AcceptChanges on a 2nd thread
simply hang the app without throwing an exception? I've done this with
various records so I don't think it's the data content.