Re: Communicating errors between Oracle and C++ code
From: Lim, Young-sang <guerbois_at_kdline.co.kr>
Date: 2000/05/31
Message-ID: <okQF#npy$GA.233_at_news1.sys.netsgo.com>
Date: 2000/05/31
Message-ID: <okQF#npy$GA.233_at_news1.sys.netsgo.com>
There's a way that can communicate with oracle and c++. If you use pro*c as a c++ version, you can handle error message in your program.
If your program is already written as a c++, then just insert some additional environment code and sample code can be found in your system, if you install pro*c option when you install oracle database.
Some other way, You can also cat error code by storing error number in some database table and chek them in error table.
-- ------------------------------------------------------------------------- --- Always DO! What you want to BE! Life is too short to be serious about everything! ========================= ============= Korea Digital Line Co., Ltd. System Development Division / Researcher Oracle Certified Professional DBA Sun Certified JAVA Programmer Tel. : +82-2-518-0101(Ext. 146) Fax. : +82-2-518-0133 MP : 011-362-2607 Name : Lim, Young-sang E-Mail : guerbois_at_kdline.co.kr ------------------------------------------------------------------------- --- "Ted" <ted graham_at_my-deja.com> wrote in message news:8h0ki7$bdd$1_at_nnrp1.deja.com...Received on Wed May 31 2000 - 00:00:00 CEST
> 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.
--