Getting empty resultset for stored procedure having two returns
Joined: Mar 02, 2004
In my servlet I am using stored procedure which searches in one table on given field. If data is not found in first table searches in other table. This stored proc is working fine if run from sql prompt( i.e. searches properly in second table if not found in first). It also works fine if data is present in first table but returns empty resultset if the data is in second table. Here I am putting stored procedure structure
if (searchField!=NULL) begin searching in first table if( @@rowcount = 0) begin searching in other table end end
Pls help me out in solving problem
Joined: Sep 04, 2003
Hello , Could you please be a little more elaborate Could you specify the entire code for the sp
Sampada, It sounds like you are saying that the stored proc functions differently if run from the command prompt vs JDBC. Can you post the JDBC snipet of your servlet? It could be an interfacing issue.