jeevankulkarni
asked on
ORA:06550 error
Sometimes I get the following error if I call a procedure from within java, but if I execute it using toad / sqlplus it is working fine. The same procedure works fine sometimes even from java. Please help...
SQL Exception Occured in CALLDN010PT : ORA-06550: line 1, column 228:
PLS-00103: Encountered the symbol "DN010PT"
ORA-06550: line 1, column 460:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
. ( , * % & - + / at mod rem <an identifier>
<a double-quoted delimited-identifier> <an exponent (**)> as
from into || bulk
SQL Exception sqlExcep : java.sql.SQLException: ORA-06550: line 1, column 228:
PLS-00103: Encountered the symbol "DN010PT"
ORA-06550: line 1, column 460:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
. ( , * % & - + / at mod rem <an identifier>
<a double-quoted delimited-identifier> <an exponent (**)> as
from into || bulk
I am using AIX / Oracle 9i.
SQL Exception Occured in CALLDN010PT : ORA-06550: line 1, column 228:
PLS-00103: Encountered the symbol "DN010PT"
ORA-06550: line 1, column 460:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
. ( , * % & - + / at mod rem <an identifier>
<a double-quoted delimited-identifier> <an exponent (**)> as
from into || bulk
SQL Exception sqlExcep : java.sql.SQLException: ORA-06550: line 1, column 228:
PLS-00103: Encountered the symbol "DN010PT"
ORA-06550: line 1, column 460:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
. ( , * % & - + / at mod rem <an identifier>
<a double-quoted delimited-identifier> <an exponent (**)> as
from into || bulk
I am using AIX / Oracle 9i.
ASKER
No there are no single / double quotes in it ...
post your statement/query, which is giving errors
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I was building callable statement in a for loop as it had 54 parameters.
int DN010PTPARAM = 54;
cs_dn010pt.append("{call DN010PT(");
for(int i=0;i<DN010PTPARAM;i++)
{
if(i!=DN010PTPARAM-1)
{
cs_dn010pt.append("?,");
}
else
{
cs_dn010pt.append("?)}");
}
}
Instead of doing this I built a simple callablestatement as below.
cst_dn010pt = connection.prepareCall("{c all DN010PT(?,?,?,?,?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?) }");
This is working.
The prior approach had no problem whatsoever, still it was'nt working the second time I ran the program. It was working once everytime we restarted the server.
int DN010PTPARAM = 54;
cs_dn010pt.append("{call DN010PT(");
for(int i=0;i<DN010PTPARAM;i++)
{
if(i!=DN010PTPARAM-1)
{
cs_dn010pt.append("?,");
}
else
{
cs_dn010pt.append("?)}");
}
}
Instead of doing this I built a simple callablestatement as below.
cst_dn010pt = connection.prepareCall("{c
This is working.
The prior approach had no problem whatsoever, still it was'nt working the second time I ran the program. It was working once everytime we restarted the server.
select * from TableName where ColumnName = 'Can't do this'
you should change it to
select * from TableName where ColumnName = 'Can''t do this'
Note '' (2 single quotes) in Can''t.