473,395 Members | 1,999 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,395 software developers and data experts.

Database File Connection String in the Application Settings - Deploy Nightmare

I have a solution with three projects in it. Two are windows forms applications and the third is a class library. I am trying to deploy the projects which use a single database located in one of the windows forms applications projects. the connetion string to the database resides in the Application Settings of the class library project. I need to change the connection string located in the application settings to match the path that the users installs the application to. right now, the application settings are not changed at all and the application is looking for the database on the path that i set on me dev computer.

Here is the value of the application setting:
Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Documents and Settings\Mfuribondo\My Documents\Visual Studio 2005\Projects\Proj - GEMSoft Version 1\GemSoft\OTCApplication\Database\GEMSoft_Database .mdf";Integrated Security=True;Connect Timeout=30;User Instance=True


You can see that it is looking on my local dev computer.



In short, i am looking for the best way to deploy a project that uses an internal database file and connection string.

any suggestions are greatly appreciated.
Feb 20 '08 #1
2 2508
Plater
7,872 Expert 4TB
What if you made it say this:

Data Source=.\SQLEXPRESS;AttachDbFilename="GEMSoft_Data base .mdf";Integrated Security=True;Connect Timeout=30;User Instance=True

Then it would look in the same directory as the .exe to find the .mdf file?
Feb 20 '08 #2
Shashi Sadasivan
1,435 Expert 1GB
There is a way to include an external app.config file
using the appsettings tag within the configuration tag

This link explains how to do it
Feb 20 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: L Mehl | last post by:
I tested a FE/BE application developed in A2000 on a A2002 machine and got this message when exiting the app. Clicking the only available button "OK", exits the application, as intended. The FE...
9
by: Nathan Sokalski | last post by:
I am trying to connect to a Microsoft Access Database from my ASP.NET Application. I use the following code to create my connection string: cmdSelect.Connection = New...
5
by: Loane Sharp | last post by:
Hi there I had no luck in getting the following question answered in the SQL Server newsgroups. Please point me in the right direction. Background: I am using the "System.Data.SqlClient"...
3
by: Ben | last post by:
Hi all I have made a vb.net windows app that works great in design. But after deploying the app on the same design computer (my own) the app can not find any of the two databases it needs to...
4
by: JM | last post by:
Hi, I am an old programmer who is only just getting back into it after about 10 years, and for the life of me I can not work out what I am doing wrong. Firstly, I've recently downloaded and...
5
by: Matt | last post by:
Hello, What is the best way to handle the database connection string for a class library project that will be compiled and used as a .dll? This .dll will be accessed via classic ASP and in...
0
by: Jonathan Wood | last post by:
I seem to be having errors creating and accessing an SQL database. Unfortunatley, I am brand new to SQL setup and administration issues so this really is not my area of expertise. I know I had...
7
by: =?Utf-8?B?TWF4R3J1dmVu?= | last post by:
I have a DLL that implements the Business and Data Layers for a number of different websites. That DLL uses a Strongly Typed DataSet to interface to the Data Source which is SQL Server. There...
1
BezerkRogue
by: BezerkRogue | last post by:
I have created a script that automates the launching of an application based upon a value in the registry. For some reason, it is not connecting to the database to read what application it's...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.