Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to generate FileID and Date?

 
Swaminathan Balasubramani
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use a sequence fo rgenerating the File ID & SysDate to retrive the System Date ( Todays Date ).
 
Swaminathan Balasubramani
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have online docs available here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic