stored procedure

CallableStatement cs;

cs = conn2.prepareCall("{call pack99.proc99(?)}");

cs.setInt(1, 1);

cs.execute();

System.out.println(cs.getInt(1));

CREATE OR REPLACE procedure test_proc is

tot number;

begin

select amt into tot from test1 where id=2;

dbms_output.put_line(tot);

exception

when others then

dbms_output.put_line('To many rows');

end test_proc;

i am getting an exception here why? "Invalid column index"

[549 byte] By [kasima] at [2007-11-27 8:16:33]
# 1
Hi,Are you calling 'test_proc' or pack99.proc99 ?.Please clarify it.Regards,Loga
Loga_07a at 2007-7-12 20:01:27 > top of Java-index,Java Essentials,Java Programming...
# 2
cs = conn2.prepareCall("{call test_proc()}");//cs.setInt(1, 1);cs.execute();System.out.println(cs.getInt(1));still i am getting same error?
kasima at 2007-7-12 20:01:27 > top of Java-index,Java Essentials,Java Programming...
# 3
any idea why it is giving error?
kasima at 2007-7-12 20:01:27 > top of Java-index,Java Essentials,Java Programming...