Click here to Skip to main content
12,695,049 members (30,935 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
Hi I m trying to make a Setup project for winForms Application, How to attach path of Database, when I execute exe file connection string will not be change.

Is any body has solution ??????
Posted 6-Apr-10 9:49am
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Do you mean you are distributing a database file with your application? Then the path is relative to the application.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Is it a standard windows setup project?

If so you have to use one of the inbuilt variables to get your relative location or have a field that gets filled in by the user when they install. You can assign a variable/name to the field and use this variable in a custom action to modify the config file where you store your database connection string.

Google for "setup and deployment" and you'll get links like

http://msdn.microsoft.com/en-us/library/ms235317%28VS.80%29.aspx[^]

Maybe a setup and deploy tutorial like http://msdn.microsoft.com/en-us/library/d9k65z2d%28VS.80%29.aspx[^] might help
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 6 Apr 2010
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100