The Artima Developer Community
Sponsored Link

Java Answers Forum
sql exception "no resultset was produced"

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
George

Posts: 10
Nickname: swiftcrash
Registered: Nov, 2002

sql exception "no resultset was produced" Posted: Nov 21, 2002 4:17 PM
Reply to this message Reply
Advertisement
i have a store proc writen in oracle, it has a cursor and it is fetching into variables.

FETCH Jrecord into
v_projectID,
v_scounty,
v_county_pct,
v_existing_lane_cnt,
v_proposed_lane _cnt,
v_comnt,
v_comnt_typ;

the store proc works fine from oracle. i get data back as
john,23,56,67,543 wells way, etc....

but when i am calling it from the bean i am getting an error back on
TPRO_J= P_TPRO.executeQuery();

now do i call the name of the fields as in the database or use the variables to call. help please and i wonder if i should be giving alias for the columns

----------here is the bean--------------------------------------------
public Vector getRecordJ(String ProjectID){
ResultSet TPRO_J=null;
try{
System.out.println("a");
CallableStatement P_TPRO=conOrcl.prepareCall("{call getJrecord(?)}");
//assign the ? to the argument passed
System.out.println("b");
P_TPRO.setString(1,ProjectID);
//execute the query
System.out.println("c");
TPRO_J= P_TPRO.executeQuery();
//looping through the resultSet
System.out.println("d");
while (TPRO_J.next()){
System.out.println("e");

//create an instance of the class
Conn JItems = new Conn();
// set it to the Bean
JItems.setCounty(TPRO_J.getString("county"));
JItems.setCountyPct(TPRO_J.g etInt("county_pct"));
JItems.setexistingLane(TPRO_J.getInt("existing_lane_cnt")) ;
JItems.setproposed_lane(TPRO_J.getInt("proposed_lane_cnt"));
JItems.setcomnt(T PRO_J.getString("comnt"));
JItems.setcomntType(TPRO_J.getString("comnt_typ"));
/ /add the object to the vector
V_itemsJ.addElement(JItems);
}

}catch(SQLException w){
System.out.println(w.getMessage());

}
//returning the vector
return V_itemsJ;

}


i am getting a message in the dos prompt
a
b
c
no resultset was produced

it stops here

help and thanx

Topic: Fat Client Previous Topic   Next Topic Topic: looping

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use