aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Allow New Database File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Allow New Database File" Watch "Allow New Database File" New topic
Author

Allow New Database File

David Sham
Ranch Hand

Joined: Apr 19, 2005
Posts: 61
I know it is not required by the assignment specs, but would it be a good idea to allow the user to add records to a brand new database file? What I mean is this:

1) The user launches the client in standalone mode.
2) A "choose database file" dialog appears in front of the empty client
window.
3) The user does not choose a database file and cancels the dialog.
4) The user is left with an empty client not showing any data. The user can
do nothing except add new records.
5) The user selects to add a new record and is prompted by another dialog to
either choose an existing database file or create a new one. If they
choose to create a new one, they must supply a new database file name.

Seems like a lot of trouble to provide additional functionality for. The other consideration I am leaning towards is to just prompt the user with a "choose database file" dialog upon client startup. If the user cancels that dialog, then they cannot do anything (all functionality is disabled or warning popups appear when an action occurs) until they choose an existing database file from the File menu.

Which way is a better solution? Thanks.
Ken Boyd
Ranch Hand

Joined: Dec 10, 2003
Posts: 329
But make sure when you submit your assignment you bundle original database file otherwise automatically fail...


SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
David Sham
Ranch Hand

Joined: Apr 19, 2005
Posts: 61
Ofcourse, you must package the original database file with your jar for submission. But do we need to be concerned about the user adding records to a new database file that the user would create? I'm leaning towards not allowing this as it says nothing in the specs about this, but I'm not totally sure.
Jared Chapman
Ranch Hand

Joined: Feb 23, 2004
Posts: 81
Make your life easier - when the user starts the program in local mode, they can either connect to a database, or press cancel. If they press cancel, just simply exit the application altogether.


B.S. University of Wisconsin<br />SCJP 1.4 (85%)<br />SCJD 1.4 (92%) B&S Contractors
Ken Boyd
Ranch Hand

Joined: Dec 10, 2003
Posts: 329
According to spec of my assignment I haven't seen such thing. So I will not implement additional things.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Allow New Database File