Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi to all,
Here my system have window 7 64 bit here i install sql SERVER now i want to connect another computer. Two computer connected with LAN connection.How to i connect that another computer to access database . i dont have static ip ok.then how i access.

What I have tried:

here i tried in SQL Server configuration manager. Click TCP/IP Protocol and do Enable and then i restart my sql service.and then that TCP/IP properties and check IPALL Port and then go to Firewall create rule for that PORT. but no use of this.
Posted

1 solution

Use the SQL Server instance name instead of an IP. This will give you a connection string like:
Data Source=PCNAME\SqlExpress;Initial Catalog=NameOfDatabase;Integrated Security=True;Pooling=False
or similar.
Since you mention C#:
Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.
 
Share this answer
 
Comments
JOTHI KUMAR Member 10918227 5-Feb-16 4:49am    
In that system VS add connection not showing my database.what can i do thne i enter manually then it show some network related error.
OriginalGriff 5-Feb-16 5:47am    
If you have a network problem, then you need to sort that out first - and I can;t do that for you! Without a working network that can reach your SQL server instance, nothing is going to work...

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