Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi i have a program made with c# and sql server express 2008 r2 and i want to run it in another PC and i installed sql server express 2008 r2 in that pc but it give me an error and don't open the program, what should i do?
here is the picture of error
http://upload7.ir/imgs/2014-10/84737973425151597995.jpg[^]
With Respect "Spaceman"
Posted
Comments
[no name] 9-Oct-14 17:16pm    
What do you mean "what should i do"? It's called troubleshooting. Read the error message. Is SQL Server in fact running? Did you configure SQL Server?Check your connection string? Is your connection string correct for that server? Is the server local or remote to your program? Can you ping the computer, if remote?
Avenger1 9-Oct-14 17:45pm    
sql server express is running
and should i change my sql connection?
i wrote this in my PC
"SqlConnection sql = new SqlConnection(@"server=SPACECRAFT\sqlexpress;database=student;integrated security=true;");"
it running without problem in My PC
Sergey Alexandrovich Kryukov 9-Oct-14 18:11pm    
Please, always show data as text. It's not hard to do.
—СА
[no name] 10-Oct-14 0:37am    
Please check the connection string
I think that is the only problem. use below query string. I think this me help you.
server=.\sqlexpress;database=student;integrated security=true;

First check the connectivity between the computers; and changes the connection string.
In connection string servername is defined as the ip of the machine on which the SQL Server is installed.
 
Share this answer
 
This error occur for the connection string related issue..

check your connection string first, maybe need to change it for the particular pc..
if not solve then see this..
See This..
http://stackoverflow.com/questions/18060667/connect-to-server-a-network-related-or-instance-specific-error[^]
 
Share this answer
 

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