aspose file tools*
The moose likes JDBC and the fly likes How to generate FileID and Date? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to generate FileID and Date?" Watch "How to generate FileID and Date?" New topic
Author

How to generate FileID and Date?

Swaminathan Balasubramani
Ranch Hand

Joined: Apr 12, 2005
Posts: 38
hi


I have a servlet whose functionality is to take information about file from the user and store it in the Database.

The Database Structure is

Name Null? Type
----------------------------------------- -------- ---------------
F_ID NOT NULL VARCHAR2(10)
F_NAME NOT NULL VARCHAR2(30)
FILE_EXT NOT NULL VARCHAR2(10)
DATE_CREATION NOT NULL DATE
DATE_LUPDATE NOT NULL DATE
D_ID NOT NULL VARCHAR2(10)
KEYWORDS NOT NULL VARCHAR2(256)
PATH NOT NULL VARCHAR2(256)


Here, i want the F_ID(File ID),DATE_CREATION(The current date when the file infomation is added)should be Autogenerated whereas the other details will be enterted by the user.

The user Interface is an HTML page which contains the all the fields with a Caption and a TextBox aganist it.When this Html page is invoked the F_ID and DATE_CREATION field should be filled with the values.

Can anyone help me with the code for this..

Thanx u for the anticipated reply

If you want more infomation kindly let me know...


B.Swaminathan<br /> <br />Mobile:+91 09886510453
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
You can use a sequence fo rgenerating the File ID & SysDate to retrive the System Date ( Todays Date ).


Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Swaminathan Balasubramani
Ranch Hand

Joined: Apr 12, 2005
Posts: 38
Hi

You said that we can use Sequence to gennerate ID and System Date but can u help me with a code to do it..

Cheers!
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
We have online docs available here.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to generate FileID and Date?