Setting Default Path for OpenFileDialog

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

Guest

Hello, I have an application that uses an access database that is stored in my computer. I would like to set up a OpenFileDialog object to be able to select the source of this database (i.e. c:\database.mdb). If I move the database to another location I would like to change the path to that other location. Once I change the location, I would like to have the new location of the database be the default location (the one that is used when you open up the application all the time) so that users can use my application. Any ideas or feedback on this will be greatly appreciated! Thanks!
 
Let me add a bit more clarification...I would like to store the path of the database in the OpenFileDialog object that I have created and use that path every time a user opens up the application. the user will have the ability to choose a different path when the database is moved and that path should be the default path from that time on! Again, any help or ideas on this will be greatly appreciated! thanks!
 
How if you record the path in a ini file or xml file .. that file can be
used to store all the configuration details related to your application.

will it be a solution?

Nirosh.

Ed P. said:
Let me add a bit more clarification...I would like to store the path of
the database in the OpenFileDialog object that I have created and use that
path every time a user opens up the application. the user will have the
ability to choose a different path when the database is moved and that path
should be the default path from that time on! Again, any help or ideas on
this will be greatly appreciated! thanks!
 
you could store the path in the Registry for each user... and each you would
use OpenFileDialog
you would first load the string from the registry...

Ed P. said:
Let me add a bit more clarification...I would like to store the path of
the database in the OpenFileDialog object that I have created and use that
path every time a user opens up the application. the user will have the
ability to choose a different path when the database is moved and that path
should be the default path from that time on! Again, any help or ideas on
this will be greatly appreciated! thanks!
 
Back
Top