Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No resultset ??????

 
Sanjay Deshpande
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a stored proc in sql server :
==========
@id varchar(20)
AS
BEGIN
declare @Compid varbinary(8)
begin
select @compid=cast(@compId1 as VarBinary(8))
print @compid
Select C.CompName
fromc_CompType T,
c_Company C
end
end
===========
my jdbc code in jsp is like this :with all other necessary things like try import et al

java.sql.CallableStatement cst1=con.prepareCall("{call Proc_Company_Get(?)}");
//cst1.registerOutParameter(2,Types.VARCHAR);
cst1.setString(1,"0x0000000000000DF4");


ResultSet rs1 = cst1.executeQuery();
while(rs1.next()){
out.print("sanjay2"+rs1.getString(1));
}

dsn is ok.The table gives result using dsn
proc runs fine in sql debugger
BUT
i am not getting resultset in jsp

i do not get an exception as well.
 
Vlad Patryshev
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try the same using plain SQL? Did you try doing the same from a java application? Since you declare a result set and assign it some value, you must have something there (well, maybe an empty set), right?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic