• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem of database

 
David George
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sun request:
1 . the program must allow the user to specify the location of the database
2 . and it must also accept an indication that a local database is to be used .

This is the most difficult thing in my cetification examination . I have no idea how to deal with it .
To 1 . Should i make a JTextField in GUI and allow the user to enter the path of the database file ?
To 2 . when i start the program with argument "alone" , the local database be used .

Wait for your idea . Thank you , thank you very much .
Yours David
 
Christian P�cher
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This specification calls for a preferences dialog, can't you hear it shouting?
Have a default URI for your DB on deploy and make it configurable in the preference dialog. If you want to, you could save the URI in a Properties file.

HTH, Chris
 
David George
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It must also accept an indication that a local database is to be used.

Does this means that i use the argument "alone" to launch the program , default use the local database?
 
Ta Ri Ki Sun
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by David George:
It must also accept an indication that a local database is to be used.

Does this means that i use the argument "alone" to launch the program , default use the local database?


David don't rush into it, sit back and read the instructions a couple of times, that should help clear it up.
To answer your question alone means no server is running, "server" I believe starts the server and no argument means start the GUI client but connect to the default or previously used server.
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i can confirm that the previous writer is exactly right. two flags, three modes, everything makes sense at the end of the day ;-)

greetings,
jan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic