Sunday, September 18, 2011

A network-related or instance-specific error occured while establishing a connection to SQL server !!!

Hello everybody,

This nasty error most SQL developers know,I won't talk to much because the whole net are filled with answers to solve this error but most of the time it does not work.

I 've tried all the points mentioned on the net without any benefit.

My app works without any problem in original developing Pc but in another Pc it does not.

I found out that the problem was with multiple connection strings,

 Let me explain, My app is N-tier app,The dataset itself is in isolated project with it 's own connection string.
 The Main project has also a connection string for some data work. So we end up with a solution that contains two connection string ,This will give you the above error even if the connection strings are correct which was my case.
So I readjust the app and made One-connectionString-App and it worked like a charm.

I hope this will help you guys.