Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help Me Please !!! Confused

 
Anurag Mishra
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys
I am very much confused regarding this problem. I have taken a path for database file called db.db as Data data=new Data("c:/scjd/starting/client/suncertify/db/db.db") and it is working fine in the windows platform, but if I have to execute my application from some other drive i.e from d: drive then it show's an error (Database file not found) and also when I run my application in some another operating system (Linux) other than windows than also my application won't work properly because of mentioning c: drive in the path. So please tell me the solution how to get a current drive name of any O/S and how i have to mention this in my application.I will be very much thankful to you.
Anurag Mishra
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a relative path, or make the location of the database file a command-line argument.
- Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic