Thread View: borland.public.cppbuilder.database.multi-tier
1 messages
1 total messages
Started by Kevin
Thu, 16 Sep 2004 22:25
Exceptions in App Server are Raised in Client?!
Author: Kevin
Date: Thu, 16 Sep 2004 22:25
Date: Thu, 16 Sep 2004 22:25
29 lines
2484 bytes
2484 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads