Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all!
I have a setup project ,includes :

.Net Framework 2.0
.Net Framework 4.0
SQL Express 2005
exe file

(It's no need installing SQL Server Management Studio)
When first installing, (the folder after installing includes one MDF file and one LDF file) it works fine.
But when I uninstall this, and reinstall, it throws an error
"a network-related or instance-specific error occurred while establishing a connection to sql server...."

Please help me to solve this problem.
Thanks a lot
Robinson.
Posted

if you are try to connect from remote machine to sql server:I think your sql server browser service is not started so please start that service and try again. Or your firewall is blocking the sql connection with server so check your firewall.

if you are try to connect from local machine: it may be your instance name is incorrect so check your new instance name.
 
Share this answer
 
v2
HI,

You don't really need to install management studio to run your application. Not it really depends on what are you doing in your application when it starts. Did you also check the name of your instance in your system and in your application is same. I mean did you check your connection string. Or did you check the service? If sql server is installed or it is running??
 
Share this answer
 
.mdf files are SQL Server database files. other application can not understand those files. So you need need a SQL instance to open/read/write mdf file. That instance can be local, can be an Express edition, or can be a remote one, doesn't matter. If your application needs a local SQL instance for it's own use then it can install SQL Server Express Edition when deployed
 
Share this answer
 
Comments
[no name] 2-Apr-12 21:25pm    
Thanks Uma. But would you please tell me clarify ?
uspatel 3-Apr-12 1:59am    
Install SQL Server Express Edition,an instance of sql server will be installed that will be needed to write connection string,You can see various connection strings
http://www.connectionstrings.com/sql-server-2005
Each connection string require data source or server name
data sourse/server name are instance of sql server that can be remote or local.

[no name] 3-Apr-12 3:24am    
How can I do to solve this problem, I have read that link you give before I asked this issue
Please help me
uspatel 3-Apr-12 3:26am    
now what problem occur?

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