• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to generate FileID and Date?

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have online docs available here.
reply
    Bookmark Topic Watch Topic
  • New Topic