Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Allow End-User to Point to Database with a Visual Studio 2008 Windows Application
 

Allow End-User to Point to Database with a Visual Studio 2008 Windows Application

I am somewhat new to Visual Studio and am not the strongest with deploying applications.I am wanting to deploy a simple windows application that connects to an access database but I want the end-user to be able to install multiple instances of this application on different machines and then access the one database on their network. How do I allow the end-user to browse and point to the .mdb file and then use that .mdb file as the db that the windows app relates to.

Any help would be greatly appreciated. Thanks
JacRio  Saturday, September 05, 2009 3:29 AM

You can use ClickOnce to deploy your application.

ClickOnce Overview
http://msdn2.microsoft.com/en-us/library/142dbbz4(VS.80).aspx

HowTo publish a clickonce app
http://msdn2.microsoft.com/en-us/library/31kztyey(VS.80).aspx

As for the database, add an open file dialog that runs if the user has not set the location of the database, and lets him browse to it, then set your connection string.

RobinDotNet


Click here to visit my ClickOnce blog!
RobinDotNet  Saturday, September 05, 2009 5:03 PM
You write a configuration utility that the user runs afterwards. When your app starts it can look at a flag and see that it's not configured, then show an app dialog allowing browsing to another computer.
Phil Wilson
PhilWilson  Tuesday, September 08, 2009 7:41 PM

You can use ClickOnce to deploy your application.

ClickOnce Overview
http://msdn2.microsoft.com/en-us/library/142dbbz4(VS.80).aspx

HowTo publish a clickonce app
http://msdn2.microsoft.com/en-us/library/31kztyey(VS.80).aspx

As for the database, add an open file dialog that runs if the user has not set the location of the database, and lets him browse to it, then set your connection string.

RobinDotNet


Click here to visit my ClickOnce blog!
RobinDotNet  Saturday, September 05, 2009 5:03 PM

How do you set that connection string so that it is reloaded the next time the app is ran? I can set it as a public variable and it will run fine but when the app is closed and then launched again the user needs to re-point to the database.

Thanks.

Jason.PK  Tuesday, September 08, 2009 2:19 PM
You write a configuration utility that the user runs afterwards. When your app starts it can look at a flag and see that it's not configured, then show an app dialog allowing browsing to another computer.
Phil Wilson
PhilWilson  Tuesday, September 08, 2009 7:41 PM

You can use google to search for other answers

Custom Search

More Threads

• Application Open Twice, Error on Load
• Unable to retrieve the Target directory path from a VB Script
• Changing Default location for installer
• Trouble using a merge module created with install shield.
• installState exception
• How to copy all files in a directory during custom install
• ClickOnce application as a system shell
• Problem with clickonce in a local-installed web application
• Publish Wizard fail
• LoadLibrary() failure