Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

selecting more than one records in a single entity bean at a same time  RSS feed

 
Mahendran Aiyappan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Sir,

I got a remote object which is pointing to a single record at a time (Bean Managed Persistence). Now i have written a business method such as


public int Invoice_Count(int po_ID) throws Remote Exception
{
PreparedStatement pst = con.(query="select count(*) from apa_invoice
where po_id = ?");
ResultSet rs=pst.executeQuery();
return(Integer.parseInt(rs.getInt(1)));
}

Here i have code snippet only...
Now my question is whether the remote object which is currently pointing a single record can handle this type of query which is for a whole table. Whether this code will successfully execute or not.


Thanks
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why shouldn't it?

I do hope however that that's not all the code in your method, else you are in for some rude surprises.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!