hai all,
I am new this concept , can any one explain me how to call a stored procedure from
java.
stored procedure is
create or replace procedure show_emp
as
name varchar(10);
begin
select emp_name into name from EMP where sal=2000;
end;
this procedure( which does not take any parameters and there exists a row in EMP table with salary 2000 ) was created successfully
but when i am using CallableStatement and calling the procedure , the output is 'No ResultSet is produced'.
code snippet is as follows
CallableStatement cs = con.prepareCall("{call show_emp}");
ResultSet rs=cs.executeQuery();
rs.next();
System.out.println(rs.getString(1));
please explain me how to call the procedure using prepareCall.
Thanks in advance
Haripriya
SCJP1.4