Click here to Skip to main content
15,066,651 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
When I create a setup project i have a problem with add the sql server 2008 r2 as a prerequisite to the setup project it's not shown in the list of the prerequisite

Iam trying to make setup without sql and install the sql server 2008 r2 in the computer of the end user but i have an error
Unhandled exception has occurred in your application.
A network-related or instance-specific error occurred while establishing a connection to sql server.the server was not found or was not accessible.verify that the instance name is correct and that sql server is configured to alow remote connections.
Posted

1 solution

If I understood you correctly, you install the SQL Server separately from the application setup.

If this is correct, your error message defines that the SQL Server is unavailable when you start the program. Some potential reasons:
- the sql server is not running
- workstation firewall is blocking requests
- your connection string isn't corrrect
- your credentials / user info is incorrect

For more reasons, see http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/[^]
   
Comments
Roweids Saif 1-Aug-14 10:06am
   
Thanks for solutions but the error still there.. i think we must include the sql server as a prerequisite in the setup folder but i don't know how to do this
Roweids Saif 1-Aug-14 10:10am
   
Iam not add the database to the setup folder is there need to add it,if yes how we add a database to the setup folder?
Roweids Saif 1-Aug-14 10:13am
   
This is the first time to me to create a setup project in visual studio
Wendelius 1-Aug-14 11:42am
   
Typically Sql Server is not included in a client setup. Instead it is installed centrally on a database server. However, if your application is designed to use standalone, single user database then it would make sense to include Sql Server in the installation. For example using LocalDB, see http://msdn.microsoft.com/en-us/library/hh272703(v=vs.103).aspx[^]

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




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900