By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,963 Members | 1,749 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,963 IT Pros & Developers. It's quick & easy.

Setting Default Path for OpenFileDialog

P: n/a
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!
Nov 15 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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!
Nov 15 '05 #2

P: n/a
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." <an*******@discussions.microsoft.com> wrote in message
news:5B**********************************@microsof t.com...
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!
Nov 15 '05 #3

P: n/a
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." <an*******@discussions.microsoft.com> wrote in message
news:5B**********************************@microsof t.com...
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!
Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.