BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Exceptions in App Server are Raised in Client?!

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
Kevin
Guest





PostPosted: Thu Sep 16, 2004 10:25 pm    Post subject: Exceptions in App Server are Raised in Client?! Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.