Domanda

I have built a Windows Forms application using Visual Studio 2012 and MSSQL 2008. I need to deploy this project using InstallShield Limited Edition.

While running this application on my pc, it does nto work well when I use the following connection string or .//SQLEXPRESS.

enter image description here

I need the installer to find the exe file of the application on other uer's pc with the database file. Where do I need to put my database files in the deployment files folder? What should my connection string be?

enter image description here

enter image description here

enter image description here

È stato utile?

Soluzione

i use .//SQLEXPRESS it doesnt work as well

DO NOT use .//SQLEXPRESS as datasource name in the connection string.

Recommended way is to menthion Instance Name if your application is to be deployed in different environments(especially OS). I ran into trouble when I had the Datasource as .dot which worked in Win 7 not in WinXP. Either one of the following approach works fine.

  • (local)\SqlInstanceName
  • (ComputerName)\SqlInstanceName Ex: CD-SJHONES\SQLINSTNACE

In certain cases i had to include the computer name, So during the application deployment i get the computer name and update the connection string accordingly.

where i need to put my database files in deployment files and folder and what should be my connection string

Connection string

I have already answered connection string releated question above.

Database files

What do you mean by database file. how database is created in the client machine ? do you create a database during application deployment or users manually create it with script ? There is nothing to worry about the database fine as long as your application have right connection string to point to your database.

Application files and folders

Again this doesn't really matter where application files and folders resides in the client machine. It's upto the users to decide where he/she likes to install the application.

Altri suggerimenti

You cannot install from backup. Also in your scenario, you should force end user t install Sql Express, what If it has already installed. So You need considering , scripting of entire database. You can create another exe / look for option in Installshield to execute that Script incase the database server is found else, force user to download the Sql Sever Express or Embedd it into setup and execute the script over there. But that will make your Setup Size more than 100's of MB.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top