Click here to Skip to main content
15,878,959 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
dear friends,
i create setup file and instal it on another PC.
when run the software an error will show like this:
"A network related or instance-specific error occured while establishing to sql server.the server was not found or was not accessible.verify that the instance name is correct and that sql server is "
my connection string is:
con="server=.,database=book,integrated security=sspi";

please help.what is the problem? .
Posted

1 solution

your servername is missing, I think if you are using sql express then use .\SQLEXPRESS

so your connection string looks something like
con="server=.\sqlexpress,database=book,integrated security=sspi";

updated if ur servername is mostafaPC, then

con="server=MostafaPc,database=book,integrated security=sspi";
 
Share this answer
 
v2
Comments
FM7 15-Aug-12 6:48am    
it is not sqlExpress,]
it is sql server
Santhosh Kumar Jayaraman 15-Aug-12 6:50am    
then wats ur server name?
FM7 15-Aug-12 6:51am    
it is mostafaPC
Santhosh Kumar Jayaraman 15-Aug-12 6:57am    
updated the solution. It should be con="server=MostafaPc,database=book,integrated security=sspi";
FM7 15-Aug-12 7:00am    
but if i instal the program on other systems,does it work with this con?

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