473,399 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Setting Default Path for OpenFileDialog

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
3 6973
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: kelkel | last post by:
my app needs users to input a path, they can type or click a "browse" button to select it. I only know "OpenFileDialog" to select file, can i apply "OpenFileDialog" in this case? or is there any...
7
by: Sakharam Phapale | last post by:
Hi All, I want to give option to user for selecting directory, just like for selecting file using OpenFileDialog control. How to make it possible?
2
by: VhD50 | last post by:
Hi, I'm using the OpenFileDialog to let the user pick a file, then I need to get the file name and file path of the picked file and store it in a database. My problem comes in when the user picks...
1
by: Shilpa | last post by:
Hi, I have a OpenFileDialog on my windows form whose filter is *.*. I want the users to be able to further filter the files by giving *.doc or *.zip etc in the "file name" field of the dialog...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
2
by: vbaDev | last post by:
Hi. I am using Access 2000 and in my code I'm exporting a table into an Excel file (creating it), then the code needs to export another query into the same file (a new worksheet). So I needed both a...
2
by: MikeY | last post by:
Hi everyone, I"m having a problem with the OpenFileDialog() changing my path to save to my .resources file. I'm a bit baffled why this is happening, even when I set the OpenFileDialog back to...
5
by: =?Utf-8?B?UGVy?= | last post by:
I want to change the current path in the OpenFileDialog in runtime. When the user presses OK-button I'm checking the selected path if it's valid for my application. If it's not valid I want to set...
6
by: SpreadTooThin | last post by:
After I select a file with the OpenFileDialog, I get the file name with .FileName, but I want to know the drive and path where that file is. What function, method, class can I use in C# to get the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.