Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I give the following coding

Public con As New SqlConnection("Data Source=192.170.1.90,1433;Network Library=dbmssocn;Initial Catalog=phoneix;User Id=sa;Password=welcome;Integrated Security=SSPI")


This error occured when I connecting sql server

A network related or instance error will occured
a connection attempt failed because the connected party did not properly respond or establishing hosted is failed 


Please help me solve this problem
Posted
Comments
phil.o 18-Jan-12 9:51am    
Problem could be on the SQL Server itself.
Lauch SQL Server configuration tool and check that TCP/IP is activated for the instance you're trying to connect to.
Check also that incoming connections on port 1433 are not firewalled.

This means that your vb.net application cannot connect to the SQL server. check the connection string (IP, username etc.) & the SQL server is configured to accept remote connections over IP

Check the different options for connecting to sql server:

http://www.connectionstrings.com/sql-server-2005[^]

http://www.connectionstrings.com/sql-server-2008[^]
 
Share this answer
 
Comments
devausha 18-Jan-12 8:24am    
I try all the methods in the above Link,but it is not working
1. Go to 'C:\Windows\System32\drivers\etc'.
2. Open hosts with Notepad program.
3. Uncomment this line: '127.0.0.1 localhost' or add it if it's not on the host entry.

That's it! Save the changes you've made and refresh your browser.

Hope this helps!

* NOTE - Make sure you have a full access on 'hosts' file.

Right click on 'hosts' file then click 'Properties'.
On 'Security' tab click 'Edit..' button.
Select the user that you are currently using.
Under 'Permissions for Users' box, tick 'Full control' on 'Allow' column.
And then click 'OK' button to apply the changes.
 
Share this answer
 
Comments
phil.o 18-Jan-12 9:48am    
My vote of 1 : It has absolutely nothing to do with the question.

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