CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 error

Print topic Send  topic

Author Message
rameesh

Posts: 2
Posted: 10/14/2007, 10:32 PM

String filename=request.getParameter("uploadfile");
PreparedStatement ps = con.prepareStatement("insert into loader values('" +filename+ "')");
//File fileIn = new File("C:\\diso_temp\\" + filename);
File fileIn = new File(new File("/").getAbsolutePath()+File.separator+"tomcat"+File.separator+"webapps"+File.separator+"ROOT"+File.separator+"image"+File.separator+"filename");
int fileLength = (int) fileIn.length();
InputStream streamedFile = new FileInputStream(fileIn);
ps.setBinaryStream(1, streamedFile, fileLength);
ps.executeUpdate();
ps.close();
streamedFile.close();
con.close();




i am using this coding not store file in database please help me very urgent
this my mail idrameeshmsc@gmail.com
send it
View profile  Send private message
rameesh

Posts: 2
Posted: 10/15/2007, 1:06 AM

Quote rameesh:
String filename=request.getParameter("uploadfile");
PreparedStatement ps = con.prepareStatement("insert into loader values('" +filename+ "')");
//File fileIn = new File("C:\\diso_temp\\" + filename);
File fileIn = new File(new File("/").getAbsolutePath()+File.separator+"tomcat"+File.separator+"webapps"+File.separator+"ROOT"+File.separator+"image"+File.separator+"filename");
int fileLength = (int) fileIn.length();
InputStream streamedFile = new FileInputStream(fileIn);
ps.setBinaryStream(1, streamedFile, fileLength);
ps.executeUpdate();
ps.close();
streamedFile.close();
con.close();




i am using this coding not store file in database please help me very urgent
this my mail idrameeshmsc@gmail.com
send it

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.