Home » Developer & Programmer » JDeveloper, Java & XML » PL SQL Error
PL SQL Error [message #131216] |
Thu, 04 August 2005 20:03 |
shon2005
Messages: 2 Registered: August 2005 Location: ca
|
Junior Member |
|
|
Hi All, I am newbie to PL-SQL and I am trying to execute the procedure and iam getting the following error..
17:23:24,379 INFO [STDOUT] java.sql.SQLException: ORA-06550: line 1, column 269
0:
PLS-00103: Encountered the symbol "DECLARE"
17:23:24,379 INFO [STDOUT] at oracle.jdbc.dbaccess.DBError.throwSqlExceptio
n(DBError.java:134)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.j
ava:289)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573
)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Pro
tocol.java:1891)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFet
ch(TTC7Protocol.java:1093)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.driver.OracleStatement.executeNon
Query(OracleStatement.java:2047)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.driver.OracleStatement.doExecuteO
ther(OracleStatement.java:1940)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.driver.OracleStatement.doExecuteW
ithTimeout(OracleStatement.java:2709)
17:23:24,379 INFO [STDOUT] at oracle.jdbc.driver.OracleStatement.execute(Or
acleStatement.java:854)
17:23:24,379 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.WrappedStatem
ent.execute(WrappedStatement.java:66)
17:23:24,379 INFO [STDOUT] at com.exelixis.plateloader.dao.UploadPlateLoade
r.postToDB(UploadPlateLoader.java:199)
17:23:24,379 INFO [STDOUT] at com.exelixis.plateloader.dao.UploadPlateLoade
r.run(UploadPlateLoader.java:81)
17:23:24,379 INFO [STDOUT] Message from PostToDB method>>>>>DB_ERROR
|
|
|
|
|
Re: PL SQL Error [message #131374 is a reply to message #131216] |
Fri, 05 August 2005 11:31 |
shon2005
Messages: 2 Registered: August 2005 Location: ca
|
Junior Member |
|
|
Here is the procedure, I am doing this using Java Program and iam appending to the String buffer.
plProcedure.append("declare ");
plProcedure.append("bresult BOOLEAN; ");
plProcedure.append("well DBMS_SQL.VARCHAR2_TABLE; ");
plProcedure.append("cmpd DBMS_SQL.VARCHAR2_TABLE; ");
plProcedure.append("batch DBMS_SQL.VARCHAR2_TABLE; ");
plProcedure.append("conc DBMS_SQL.NUMBER_TABLE; ");
plProcedure.append("qty DBMS_SQL.NUMBER_TABLE; ");
plProcedure.append("begin ");
for (int r = 0; r < exelData.size(); r++) {
plProcedure.append("cmpd(" + r + ") := '" +
exelData.get(r) +
"'; ");
}
for (int k = 0; k < batchNoList.size(); k++) {
plProcedure.append("batch(" + k + ") := '" +
batchNoList.get(k) +
"'; ");
}
for (int p = 0; p < wellList.size(); p++) {
plProcedure.append("well(" + p + ") := '" +
wellList.get(p) +
"'; ");
}
plProcedure.append(
"bresult := PACK_AB_IMPORT.INSERT_PLATE('");
plProcedure.append(barcodePasteData.get(i));
plProcedure.append("', '" + "NULL" + "', ");
plProcedure.append("'" + "NULL" + "', '");
plProcedure.append(plateFormatID);
plProcedure.append("','" + plateGroup + "', '");
plProcedure.append(assay +
"', TO_DATE(' " +
date + "','YYYY-MM-DD'), NULL, " +
0 + ", ");
plProcedure.append("0, 0, '" + 0 +
"', 0, 0, 0, NULL, ");
plProcedure.append("'" + "NULL" + "', '");
plProcedure.append("NULL" + "', '");
plProcedure.append("NULL" + "', NULL, ");
plProcedure.append("'" + resGroup + "', cmpd, ");
plProcedure.append("batch, well, qty, conc, '" +
userName +
"', TRUE, FALSE , NULL); end;");
System.out.println("PL PROCEDURE >>>>>>>." +
plProcedure.toString());
System.err.println(plProcedure.toString());
stmtUploadPlate.execute(plProcedure.toString());
|
|
|
Re: PL SQL Error [message #131712 is a reply to message #131216] |
Tue, 09 August 2005 02:02 |
mchadder
Messages: 224 Registered: May 2005 Location: UK
|
Senior Member |
|
|
Hello.
It'd be really helpful if you could post the output of the
System.out.printline at the end.
One thing I would recommend, well I'd insist on it if it was up to me, is that you utilise bind variables (see
here for a discussion on this), rather than just plugging all those values into that PL/SQL block.
Rgds.
|
|
|
Goto Forum:
Current Time: Mon Nov 25 10:40:08 CST 2024
|