Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 9th, 2003, 07:12 AM
Registered User
 
Join Date: Jul 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to get File type before save to database

Hello,

One confusion I have, while I am trying to upload file from Client machine and saving it to DataBase,

From saving the file to database I am using Prepared Statement here for

[1] for image type file we are using setBinarySream()
[2] for txt or doc file type we are using setAsciiSream()

* please tell is some general stream format is for all type of files, or we have to set Stream according to file.

* if different file is having different stream then please tell me how we can get the type of file befoe uploading so that we will use the right Stream while before save to database.

Please tell me with code.
Do replay
Regards.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Save database schema to XML file brettk_1 General .NET 2 September 16th, 2006 04:27 AM
Save xlsheet file in a database nachi_hota ADO.NET 1 August 4th, 2006 05:08 AM
Save BINARY FILE in ACCESS database gasma1975 Access 4 February 10th, 2005 12:16 PM
<input type="File"> - Specify File Type and Path gp_mk Classic ASP Basics 2 August 2nd, 2004 03:07 AM
How to get File type before save to database. monika_jain_99 Pro JSP 1 July 19th, 2003 05:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.