Missing Data for CallableStatement function with JDBC connection
From: Ferman (ferhat_torgaloz_at_hotmail.com)
Date: 02/11/04
- Next message: Jeff Rhines: "Re: Portable stored procedures"
- Previous message: Allen Chesley: "Re: Trouble using JNDI with Tomcat and Oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 11 Feb 2004 14:39:19 +0200
Hi,
I am using the CallableStatement class for dynamic procedure call in the
JDBC connection. That code is below;
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn.DriverManager.getConnection(pURL, pUser, pPass);
StringBuffer vMsg = new StringBuffer(2048);
CallableStatment vCallSt = conn.prepareCall("begin srvatm.process(?, ?);
end;");
vCallSt.registerOutParameter(2, Types.VARCHAR);
vCallSt.setString(1, "Ahmet");
vMsg.delete(0, vMsg.capacity());
vCallSt.execute();
vMsg.append((String)vCallSt.getObject(2));
When I run this code, it returns only the first 34 characters of the output
data. However the output data is 36 characters;
'DBS4001101T1102200414270900000001002'.
Why couldn't I get the all of output data into the vMsg variable?
Can you pelase help me ?
- Next message: Jeff Rhines: "Re: Portable stored procedures"
- Previous message: Allen Chesley: "Re: Trouble using JNDI with Tomcat and Oracle"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]