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
Joined: Mar 25, 2002
Posts: 264
posted
0
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
Joined: Jun 25, 2001
Posts: 110
posted
0
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
Joined: Sep 09, 2001
Posts: 130
posted
0
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..