• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ORA-01008: not all variables bound trying to call CallableStatement

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to call the following PLSQL and I get ORA-01008: not all variables bound

I was not able to find the missing variable as all of them are set properly

CREATE OR REPLACE PROCEDURE XXORT_INSERT_DISPOSITION
( p_orgCode INVARCHAR2
, p_orderNum IN VARCHAR2
, p_item IN VARCHAR2
, p_lot INVARCHAR2
, p_qty INNUMBER
, p_subInv INVARCHAR2
, p_status INVARCHAR2
, p_createDate IN VARCHAR2
, p_createBy INVARCHAR2
, p_updateDate IN VARCHAR2
, p_updateBy INVARCHAR2
)
IS

BEGIN
INSERT
INTO XXORT_RETURNS_DISPOSITION(ORGANIZATION_CODE,ORDER_NUMBER,ITEM_NUMBER,LOT_NUMBER,QUANTITY_SCANNED,DISPOSITION_CODE,LINE_STATUS,CREATION_DATE,CREATED_BY,LAST_UPDATE_DATE,LAST_UPDATED_BY)
VALUES(p_orgCode,p_orderNum,p_item,p_lot,p_qty,p_subInv,p_status,p_createDate,p_createBy,p_updateDate,p_updateBy);

END XXORT_INSERT_DISPOSITION;

_____________________________
JAVA CODE AS FOLLOWS
------------------------------

oraclecallablestatement = (OracleCallableStatement)connection.prepareCall(sqlString);

oraclecallablestatement.clearParameters();
oraclecallablestatement.setMaxFieldSize(200);

oraclecallablestatement.setString(1, orgCode);
oraclecallablestatement.setString(2, orderNum);
oraclecallablestatement.setString(3, item);
oraclecallablestatement.setString(4, lot);
oraclecallablestatement.setDouble(5, qty);
oraclecallablestatement.setString(6, subInv);
oraclecallablestatement.setString(7, status);
oraclecallablestatement.setString(8, "SYSDATE");
oraclecallablestatement.setString(9, createBy);
oraclecallablestatement.setString(10, "SYSDATE");
oraclecallablestatement.setString(11, updateBy);


oraclecallablestatement.execute();
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you please post wha tis the sqlString in the following statement?

oraclecallablestatement = (OracleCallableStatement)connection.prepareCall(sqlString);

Thanks
 
vikram nalagampalli
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sqlString = " begin ? := XXORT_INSERT_DISPOSITION (?,?,?,?,?,?,?,?,?,?,?); end;";
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try Regards, Jan
 
R Laksh
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vikram,

Seems you are using the query string in oracle format.

You are not registering the out parameter. Thats the cause for the
exception thrown.

JanCampus has given the JDBC syntax.

See the following link
http://www.enterprisedt.com/publications/oracle/result_set.html

It may helpful

Thanks
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic