Re: Oracle procedure raises exception but looks to be successful from DBI

2008-01-28 Thread Martin Evans
Jeffrey Seger wrote: begin proctest(?); end; is the more desirable syntax for calling oracle procedures. It's an anonymous pl/sql block. I personally had never seen the call proctest() syntax used in Oracle. It's valid syntax, but it doesn't appear to be doing what you want it to do.

Re: Oracle procedure raises exception but looks to be successful from DBI

2008-01-28 Thread Charles Jardine
On 25/01/08 15:25, Martin Evans wrote: Hi, I've just spent a long time tracking down a bug in an Oracle procedure because DBI's execute method returned success even though the procedure raised an exception. Shouldn't exceptions raised in procedures cause execute to fail? [ snip ] my $s =

Oracle procedure raises exception but looks to be successful from DBI

2008-01-25 Thread Martin Evans
Hi, I've just spent a long time tracking down a bug in an Oracle procedure because DBI's execute method returned success even though the procedure raised an exception. Shouldn't exceptions raised in procedures cause execute to fail? Here is an example: use DBI; use strict; use warnings;

Re: Oracle procedure raises exception but looks to be successful from DBI

2008-01-25 Thread Jeffrey Seger
begin proctest(?); end; is the more desirable syntax for calling oracle procedures. It's an anonymous pl/sql block. I personally had never seen the call proctest() syntax used in Oracle. It's valid syntax, but it doesn't appear to be doing what you want it to do. According to the Oracle

Re: Oracle procedure raises exception but looks to be successful from DBI

2008-01-25 Thread Scott T. Hildreth
Not that I am offering you a solution, but with Oracle I have found the error messages are sometimes misleading. For example I was helping a co-worker with code. He wanted to call a stored procedure, so I sent him some example code that I had which called a function. The function I was

Re: Oracle procedure raises exception but looks to be successful from DBI

2008-01-25 Thread Martin Evans
John Scoles wrote: I sort if expected that for the exec it is usualy only used withing SP perhaps begin; exec(user.package.proctest(?)); end; ?? who knows same problem as without exec: PLS-00302: component 'PACKAGE' must be declared The next error is usually a permission problem on the

Re: Oracle procedure raises exception but looks to be successful from DBI

2008-01-25 Thread Martin Evans
John Scoles wrote: That is an odd one, I will check with the DBAs here to see if this is normal Oracle behavior Well the error id correct but and on my box an error is thrown that I catch I did change my code over to begin track.proctest(?) end; what version of DBI and DBD are you using??

Re: Oracle procedure raises exception but looks to be successful from DBI

2008-01-25 Thread John Scoles
I sort if expected that for the exec it is usualy only used withing SP perhaps begin; exec(user.package.proctest(?)); end; ?? who knows The next error is usually a permission problem on the Oracle side. Either the use who is calling the SP dose not have execute permission for the package

Re: Oracle procedure raises exception but looks to be successful from DBI

2008-01-25 Thread John Scoles
Wow I go one right for once. Not 100% sure on why that is? Me thinks when you use 'Begin End' it forces OCI to take it as an pseudo 'stored procedure' and runs in the current OCI client. I think using call just executes as a thread off the present client and in the background someplace??

Re: Oracle procedure raises exception but looks to be successful from DBI

2008-01-25 Thread John Scoles
That is an odd one, I will check with the DBAs here to see if this is normal Oracle behavior Well the error id correct but and on my box an error is thrown that I catch I did change my code over to begin track.proctest(?) end; what version of DBI and DBD are you using?? cheers Martin

Re: Oracle procedure raises exception but looks to be successful from DBI

2008-01-25 Thread Martin Evans
John Scoles wrote: Wow I go one right for once. Not 100% sure on why that is? Me thinks when you use 'Begin End' it forces OCI to take it as an pseudo 'stored procedure' and runs in the current OCI client. I think using call just executes as a thread off the present client and in the