DB Location

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello,

I have created a simple windows form application that uses an access database as it's backend. The database will be in the same directory as the EXE file that is generated. Since the two files are in the same directory is there a way that I can get the path to the database...I have been using the registry to store this path, but want to avoid doing this. I also don't want to use the config file that has been generated.

Any info, links or suggestions will be greatly appreciated.
 
Hi Ed:

You could use Path.GetFullPath("your_filename") to retrieve the
absolute path to the file. The Path class is in the System.IO
namespace.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top