Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Jody Mills   on Nov 26 In Java Category.

  
Question Answered By: Ty Thompson   on Nov 26

I am just putting my code ...

Stored procedure  ...
*************************************
CREATE OR REPLACE
PROCEDURE remUpdNostro(flg IN varchar2,crtime IN varchar2,usr IN varchar2,upldt
IN varchar2,uplrefno IN varchar2,entrycurrno IN varchar2) AS
BEGIN
update nostro_entry
set CRCNF_FLAG = flg, CRCNF_TIME = to_date(crtime,'yyyy-MM-dd HH24:MI:SS'),
CRCNF_REMARKS = usr
where UPLOAD_INITIATION_DATE = to_date(upldt,'dd-MON-yy') and
UPLOAD_SOURCE_REF_NO = uplrefno and
ENTRY_CURRENT_NO = to_number(entrycurrno);
END remUpdNostro;

*************************************

java code ...........
*************************************
conn = DriverManager.getConnection(url,properties);
CallableStatement stmt1 = conn.prepareCall("BEGIN ? remUpdNostro(?,?,?,?,?,?);
END;");
stmt1.setString(1, "Y");
stmt1.setString(2, crdt);
stmt1.setString(3, usrid);
stmt1.setString(4, strUpload_dt);
stmt1.setString(5, strUploadrefno);
stmt1.setString(6, strEntrycurrno);

int res = stmt1.executeUpdate();
//I tried using execute() also it return me flase

if(res == 1) { flgStatus = true; }
else {flgStatus =false; }
stmt1.close();
*************************************

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Problem Java Stored Procedure Or get search suggestion and latest updates.


Tagged: