• Post Reply Bookmark Topic Watch Topic
  • New Topic

Handle is invalid!!!

 
Naresh Rajan
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i am developing an application which goes like this

f= new FileOutPutSTream(fil2);
b = new BufferOutPutStream(f);

while(resultSet.next()){
b.write(resultSet.getString("asda").getBytes());
b.write(resultSet.getString("asda").getBytes());
b.write(resultSet.getString("asda").getBytes());
b.write(resultSet.getString("asda").getBytes());

//Calling a method which calls an insert SP
insertASD(String,String,String);

}

If I have the insertASD() method then an IOException (The handle is invalid). If I remove the call insertASD() method thus not inserting into the database,I dont get the exception. Please help me in this regard.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 15711
73
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, the classes are not called FileOutPutSTream and BufferOutPutStream, but FileOutputStream and BufferedOutputStream. Please be accurate, because it might be important for solving the problem.

If the exception happens in the method insertASD, the problem must be in the method insertASD. You should look at the source code of that method and look what happens there. Look at the stack trace of the exception message. It tells you exactly in which line of source code the exception happens.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!