 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Kevin Guest
|
Posted: Thu Sep 16, 2004 10:25 pm Post subject: Exceptions in App Server are Raised in Client?! |
|
|
Hi,
I have a RemoteDataModule in an app server which contains a provider
pointing to a TQuery. Clients use a ClientDataSet to post data to the
database through this provider. In the RDM, I use the AfterApplyUpdates
event of the provider to push a new message into a queue. A separate thread
within the app server pops off these messages from the queue and then
inserts some data into another table in the database. Primary key
violations are common during the insert process and they are caught in the
UpdateError event of the TQuery responsible for the insertions. Here they
are modified to do an update instead of an insert.
Very occasionally (though it happens more often on faster machines) the
Primary Key Exceptions for the inserts to this table are raised in the
client?! How can this be? This app server thread has no interaction with
the datamodule (except that they both use the message queue which is
protected by critical sections), it has its own database, session and tquery
components. The client knows nothing about the table which is having the
records inserted. In fact this table is used nowhere else in the client or
app server. I can only assume there is a threading issue somwehere, but I'm
lost as to where to start looking. When they occurred, the exceptions in
the client happened in the same method - I included some more try catch
blocks to see if I could pinpoint it to a specific line - after I did this
the exceptions started appearing in a different method! I've put more
try/catch blocks in there too and am awaiting the results.
Any help would be greatly appreciated.
Kevin
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|