R
Ron Weiner
I am developing a PPC 2003 application (VB.Net - CF 1.1) that will be mostly
connected to a corporate Sql Server via WiFi. The application uses a local
SqlCE database to store and process all of the data it captures.
Original specifications were for the application to be able to copy all of
its captured data back the corporate Sql Server on demand. All of this has
been implemented and works without error.
Now the customer would like to be able to capture this data to the Sql
Server in near real time. If the network and server are available the whole
process takes only a second or two to run. In that I can never be really
sure that the device will be with in range of a network access point, or
(for that matter) that the server will up and running, I have a problem with
the device becoming non responsive (for something like 15-20 seconds) to
user actions when attempting to make a connection that ultimately will fail.
In an attempt to solve this problem, I tried starting the data transfer
routine to its own thread. Smooth sailing whether or not the network is
available. The device is always responsive to user input, BUT apparently
SqlCE is a "Single Trick Pony" application. I now occasionally get errors
when the main thread is attempting to access the SqlCe data base at the same
time as my background data transfer thread. This problem appears to be
database wide as I will get the error making the connection, not accessing
data in a table locked by the other process.
I am sure I am not the first person to get himself into this situation, and
was hoping that someone has had similar experience and can direct me towards
a solution. Any advice on how to architect this scenario would be most
sincerely appreciated.
connected to a corporate Sql Server via WiFi. The application uses a local
SqlCE database to store and process all of the data it captures.
Original specifications were for the application to be able to copy all of
its captured data back the corporate Sql Server on demand. All of this has
been implemented and works without error.
Now the customer would like to be able to capture this data to the Sql
Server in near real time. If the network and server are available the whole
process takes only a second or two to run. In that I can never be really
sure that the device will be with in range of a network access point, or
(for that matter) that the server will up and running, I have a problem with
the device becoming non responsive (for something like 15-20 seconds) to
user actions when attempting to make a connection that ultimately will fail.
In an attempt to solve this problem, I tried starting the data transfer
routine to its own thread. Smooth sailing whether or not the network is
available. The device is always responsive to user input, BUT apparently
SqlCE is a "Single Trick Pony" application. I now occasionally get errors
when the main thread is attempting to access the SqlCe data base at the same
time as my background data transfer thread. This problem appears to be
database wide as I will get the error making the connection, not accessing
data in a table locked by the other process.
I am sure I am not the first person to get himself into this situation, and
was hoping that someone has had similar experience and can direct me towards
a solution. Any advice on how to architect this scenario would be most
sincerely appreciated.