Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL Exception

 
Mahesh Mamani
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
While retrieving rows from the DataBase, am getting "I/O exception while talking to the server, java.io.EOFException"
The SQL exception(error) is thrown either in the Statement.exceuteQuery(String) or the ResultSet.next()...
Could any1 state the reason why this error is thrown..
Thanks in advance.

Mahesh
 
Graham Thorpe
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if u would send the code then
its possible to answer i think..
because i want to try that in
my system to find the wrong..
 
Mahesh Mamani
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
It's just a normal select statement to a database from two tables and then parses each row using the next() statement...Anyway the code as reuqested by u is below.
try{
//dbrsUpd = null;
dbrsUpd = dbconUpdstmt.executeQuery("select distinct a.excode ECODE,a.contractcode CCODE,a.contractdelivery CDELV,a.callputfut CPFUT,a.strikeprice SPRC from contractmap a,price b where a.contractcode=b.contractcode and a.excode=b.excode and a.contractdelivery=b.contractdelivery and a.callputfut=b.callputfut and a.strikeprice=b.strikeprice and a.contractcodeisp='"+ symName +"'");
while(dbrsUpd.next()){
// Take some actions
}catch(SQLException sqle3){System.out.println("SQLException3 in updateDB "+sqle3.getMessage());
appLog.entry("SQLException3 in updateDB "+sqle3.getMessage());
}


Mahesh
 
Pranit Saha
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Eof means End od file.. it seems to be there is no datas in your table.. that's why it gives you this exception..
Pranit..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic