Click here to Skip to main content
11,482,402 members (75,404 online)

coderunner2012 asked:

Open original thread
Hi Everyone

I hope you help me because i'm stuck with a big problem of setup and deployment I have developped an application with vb 2010 and the database is designed with sql server express 2008 R2 and i try to find a best solution to my problem. My problem : I want to deploy my application on another machine so once it's installed the end user is to be able to connect a database and use it for updating data , delete, adding data ...etc so the connection string was my big problem because the target machine doesn't have sql server express 2008 installed and net framework 4 too .

If we assume that the target machine has sql server express 2008 installed ,how i can know the name of server , the name of instance running on that machibe...etc ?

Where to copy my database files (.mdf and .ldf) in my project application ? is it in output project : \BIN\DEBUG or where ? because i think my connection string depends on the path where these database files (.mdf and .ldf).

My connection string is in code of my application exactly in module ,i have declared it Public it look like this :

Public strcon as string="data source=.\SQLExpress,AttachDbFilename=|Datadirectory|MyDatabase.mdf;Integrated Security=True;User Instance=True" 

One more thing, I use setup and deployment of visual studio 2010

Please advise me on the best solution because it's been several weeks since I try but I'm lost and confused about the best solution.

Thanks in advance
Tags: VB.NET

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).



Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 26 Mar 2009
Copyright © CodeProject, 1999-2015
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