Problem with executing Oracle query for creating procedure
am 27.10.2006 17:21:58 von Rosen Marinov
Hi,
i have problem with PHP and Oracle database.
I read with PHP script an sql files like this:
create or replace procedure test_proc1(p1 IN number, p3 OUT number)
as
begin
p3 := p1 + 10;
end;
And when I execute it I receive an error:
"Warning: ociexecute(): OCIStmtExecute: OCI_SUCCESS_WITH_INFO: ORA-24344:
success with compilation error in..."
And the procedue doesn't put in the database.
When I edit the .sql file - all to be on 1 row - like this:
"create or replace procedure test_proc1(p1 IN number, p2 OUT number) as
begin p2 := p1 + 10; end;"
Then I have no problems.
Can someone help me with this?
Thanks in advance,
Rosen
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Problem with executing Oracle query for creating procedure
am 28.10.2006 02:24:22 von Christopher Jones
Rosen wrote:
> Hi,
> i have problem with PHP and Oracle database.
> I read with PHP script an sql files like this:
>
>
> create or replace procedure test_proc1(p1 IN number, p3 OUT number)
>
> as
> begin
> p3 := p1 + 10;
>
> end;
>
>
>
> And when I execute it I receive an error:
> "Warning: ociexecute(): OCIStmtExecute: OCI_SUCCESS_WITH_INFO: ORA-24344:
> success with compilation error in..."
> And the procedue doesn't put in the database.
>
>
> When I edit the .sql file - all to be on 1 row - like this:
> "create or replace procedure test_proc1(p1 IN number, p2 OUT number) as
> begin p2 := p1 + 10; end;"
>
> Then I have no problems.
>
> Can someone help me with this?
>
> Thanks in advance,
> Rosen
>
Normally I'd use a tool such as SQL Developer or SQL*Plus to
pre-create database resident things like tables and PL/SQL procedures.
However, back to your problem: use UNIX style end of line characters.
Or build up the statement using PHP string concatenation.
Chris
--
Christopher Jones, Oracle
Email: Christopher.Jones@oracle.com Tel: +1 650 506 8630
Blog: http://blogs.oracle.com/opal/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Problem with executing Oracle query for creating procedure
am 28.10.2006 12:13:50 von Rosen Marinov
"Christopher Jones" wrote in message
news:4542A336.4090701@oracle.com...
>
> Rosen wrote:
>> Hi,
>> i have problem with PHP and Oracle database.
>> I read with PHP script an sql files like this:
>>
>>
>> create or replace procedure test_proc1(p1 IN number, p3 OUT number)
>>
>> as
>> begin
>> p3 := p1 + 10;
>>
>> end;
>>
>>
>>
>> And when I execute it I receive an error:
>> "Warning: ociexecute(): OCIStmtExecute: OCI_SUCCESS_WITH_INFO: ORA-24344:
>> success with compilation error in..."
>> And the procedue doesn't put in the database.
>>
>>
>> When I edit the .sql file - all to be on 1 row - like this:
>> "create or replace procedure test_proc1(p1 IN number, p2 OUT number) as
>> begin p2 := p1 + 10; end;"
>>
>> Then I have no problems.
>>
>> Can someone help me with this?
>>
>> Thanks in advance,
>> Rosen
>>
>
>
> Normally I'd use a tool such as SQL Developer or SQL*Plus to
> pre-create database resident things like tables and PL/SQL procedures.
>
Yes, but this is update system, i.e. - it will need to execute scripts from
..sql files to many servers.
The procesures/functions must be "wrapped" with wrap.exe before executing.
This is very important.
> However, back to your problem: use UNIX style end of line characters.
> Or build up the statement using PHP string concatenation.
How can I do this? Can you give me some example.
Thanks in advance,
Rosen
>
> Chris
>
> --
> Christopher Jones, Oracle
> Email: Christopher.Jones@oracle.com Tel: +1 650 506 8630
> Blog: http://blogs.oracle.com/opal/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php