Communicating errors between Oracle and C++ code
Date: 2000/05/30
Message-ID: <8h0ki7$bdd$1_at_nnrp1.deja.com>#1/1
I've just started a new project and the error handling mechanism between the code and Oracle needs to addressed. Currently, the code calls a stored_procedure which returns a magic number (e.g., 456456, 123456, 333333) to indicate its status. The developer knows what this number means, so the code checks for it and sometimes logs a more informative message or takes some action. However, there are no controls over these numbers, developers just make them up on the fly. I don't think that Oracle can throw exceptions to be caught by the C++ (we are using RogueWave's DBTools), so the next best is to define errors in a literal file shared by the stored procedures and the C++ code. This would provide informative names, consistent message phrasing and compile time checking against mismatched numbers. Is this the best way to approach this problem. I'm sure this has been solved hundreds of times, what is the preferred way?
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue May 30 2000 - 00:00:00 CEST