on 11-14-2007 2:05 PM
Hello all,
I got the error below:
Exception java.io.FileNotFoundException: D:\Home$\BLOB.txt (No such file or directory)
the code is:
PreparedStatement pSt = con.prepareStatement("insert into CLOB_COL Values(?,?)") ;
pSt.setString(1,"U");
<b>FileInputStream fis=new FileInputStream(element.getFileName()); //getting error here</b>
byte[] b= new byte[fis.available()+1];
fis.read(b);
pSt.setBytes(3,b);
pSt.execute();
pSt.close();
Please suggest:
hi
good
go through this link
http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/3483789514b748b6fe1f145e9685ab/content.htm
thanks
mrutyun^
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pradeep,
You are getting that exception, bcz it cant find the file path.
Generally it looks for tht file in the current working directory.
You can specify the file exact location (path) like this.
FileInputStream fis=new FileInputStream("C:
Documents and Settings
user
testfile.txt");
use '
' where ever you have to use '\'.
Check this API for FileInputStream.
http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileInputStream.html
Regards,
Sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
make sure that the user is having permissions for the folder that contains the file.Right click on the folders name and share that folder that folder
Message was edited by:
Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.