473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

ORACLE Error

I'm executing this code against an Oracle connection. The SQL works
perfectly under an ORACLE console, but fails when executing it from the
PHP script. I hope someone can give me a guiding light here, as i cant
find where its wrong.

<pre><?php
$conn=oci_new_connect("xxx","xxx","XXXXX");
echo "<br>TEST connect XXXXX: "; var_dump ($conn);

$sql = <<<SQLEND
DECLARE
RetVal NUMBER;
DIA DATE;
MZ NUMBER;
Z NUMBER;
BEGIN
DIA := to_date('2017-06-22 10:38:00','YYYY-MM-DD HH24:MI:SS');
MZ := 3;
Z := 1;
RetVal := TAXITRONIC.CALCULA_ESPERA (DIA, MZ, Z );

END;
SQLEND;

$stmt=oci_parse($conn,$sql);
echo "<br>STMT: "; var_dump ($stmt);

oci_bind_by_name($stmt,":RetVal",$momentoAnulacion ,32);
$rs=oci_execute($stmt);
echo "<br>RS: "; var_dump ($RS);
echo "<br>OCI ERROR: "; var_dump (oci_error($stmt));

oci_close($conn);
?></pre>

Here i paste the output with the error code (which translates from
spanish as "The symbol "" has been found when it was expected any of the
following":
TEST connect XXXXX: resource(13) of type (oci8 connection)

STMT: resource(14) of type (oci8 statement)

RS: NULL

OCI ERROR: array(4) {
["code"]=>
int(6550)
["message"]=>
string(256) "ORA-06550: línea 1, columna 8:
PLS-00103: Se ha encontrado el símbolo "" cuando se esperaba uno de los
siguientes:

begin function package pragma procedure subtype type use
form
current cursor"
["offset"]=>
int(7)
["sqltext"]=>
string(271) "DECLARE
RetVal NUMBER;
DIA DATE;
MZ NUMBER;
Z NUMBER;
BEGIN
DIA := to_date('2017-06-22 10:38:00','YYYY-MM-DD HH24:MI:SS');
MZ := 3;
Z := 1;
RetVal := TAXITRONIC.CALCULA_ESPERA (DIA, MZ, Z );

END;"
}
Jun 22 '07 #1
2 2536
En/na alex ha escrit:
I'm executing this code against an Oracle connection. The SQL works
perfectly under an ORACLE console, but fails when executing it from the
PHP script. I hope someone can give me a guiding light here, as i cant
find where its wrong.
SOLVED.

My editor was saving new lines as "\r\n" and the ORACLE parser only
understands newlines as "\n".

I was driving myself nuts!!! :)
Jun 28 '07 #2
En/na alex ha escrit:
I'm executing this code against an Oracle connection. The SQL works
perfectly under an ORACLE console, but fails when executing it from the
PHP script. I hope someone can give me a guiding light here, as i cant
find where its wrong.
SOLVED.

My editor was saving new lines as "\r\n" and the ORACLE parser only
understands newlines as "\n".

I was driving myself nuts!!! :)
Jun 28 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jan Bols | last post by:
I've been trying to install Oracle 8.1.7 on a fresh Mandrake 9.1 O.S for days, but I'm still not able to get it running. I've tried several install instructions that I found on the internet but no...
7
by: Cherrish Vaidiyan | last post by:
hello, I am been getting mad with so many doubts and errors.. I have posted some doubts,test cases regarding listener,replication and standby database.But i havent got any response..(I am...
0
by: JWM | last post by:
I am trying to implement Oracle connection pooling for the following code, which was written by someone else. Here is my main question -- this java file creates code that is executed every hour,...
3
by: David Gray | last post by:
Hello all, Having problems connecting to an Oracle 9i database from within SQL/Server 2000 using the Security/Linked Servers feature. Server1 (SQL/Server) ----------- Windows Server 2003,...
1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
13
by: Chris Botha | last post by:
The machine is running XP Pro with all the latest service packs, etc. I must access an Oracle database so I installed the Oracle client stuff. I can query Oracle from a Windows app, no problem....
5
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve...
4
by: BookerW | last post by:
I am not sure which forum I should post this on, but here is the problem. I have a front end web application(VB) on asp,net 1.1 framework. Inside of the code, I have the following lines to...
5
by: Michael Rudolph | last post by:
Hi newsgroup, I have an issue with the configuration of a DB2 federated database (WebSphere Information Integrator) in conjunction with the relational wrapper for Oracle on AIX. DB2 seems to not...
5
by: Martin Solveig | last post by:
Hello, SLES9 SP1 is on PIII with two 800MHz procesors and 2GB RAM, on four SATA 156GBhard disks are created two RAID1 arays, on one RAID is OS with 1GB swap and Oracle 10.1.0.4 enterprise edition,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.