Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi to all,
am updating local machine database by using connection method in .net..
now i want to update Remote server side database(same table in local machine) by using same program..
i know the server database username,database name,password,table name ..
please anyone help me regarding this....how should i follow in connection .......
Posted

in your connection string put your remort server ip address on server value

C#
Server=myServerAddress;Database=myDataBase;User Id=myUsername;
Password=myPassword;
 
Share this answer
 
Comments
Kumar Kovuru 2-Dec-13 4:35am    
i gave like that only..but am not able to connect to remote server database..
i want to change any thing in remote database settings...
Thilina Chandima 2-Dec-13 4:40am    
yes ur remort server need to open remote access
Kumar Kovuru 3-Dec-13 1:21am    
where can i change that remote access?
Thilina Chandima 9-Jan-14 22:28pm    
its in ur database server tcp/ip settings.
Hi

Please refer the following which will give you a complete solutions for all issues . Mark it as answer if it helps .

Not able to connect Database from web.config in asp.net[^]
 
Share this answer
 
3 thing you need to take care of if you want to connect to the remote sql server.

1) You need to get the IP address of that SQL Server.
2) Make sure the TCP/IP is enabled in that SQL Server and the port no is 1433 in the Configuration Manager in that SQL Server.
3) Make sure the firewall access for that port i.e. 1433 is enabled in that SQL Server.

Then using this code:
C#
Server=myServerAddress,portNo;Database=myDataBase;User Id=myUsername;
Password=myPassword;


you can connect to the remote SQL Server.


Best of luck.
 
Share this answer
 
Comments
Kumar Kovuru 3-Dec-13 1:17am    
Hi C@dER@j,
where can i see port no 1433?
Kumar Kovuru 3-Dec-13 1:27am    
Configuration Manager:
i have this option...
1)SQL Native Client 11.0 Configuration..
Client Protocols
Aliases
2)SQL Server Network Configuration
Proocols for MSSQKSERVER
3)SQL Native Client 11.0 Configuration
Client Protocols
Aliases...
here where can i change TCP/IP Enable..
C@dER@j 3-Dec-13 4:19am    
Go to this
SQL Server Network Configuration
Proocols for MSSQLSERVER.

Over there you will find TCP/IP enable it.
C@dER@j 3-Dec-13 4:25am    
Also you will find TCP/Ip Proporties if you will double click on TCP/IP row.
Go to IP Addresses tab and at last IPALL will be there ..over there Enter TCP Port to 1433.

Restart your SQLSERVER. You are done.

Best of luck.
Kumar Kovuru 3-Dec-13 4:37am    
that port no is not affected to my current site..is it?
Go to this
SQL Server/Network Configuration/Proocols for MSSQLSERVER.

Over there you will find TCP/IP enable it.

Also you will find TCP/Ip Proporties if you will double click on TCP/IP row.
Go to IP Addresses tab and at last IPALL will be there ..over there Enter TCP Port to 1433.

Restart your SQLSERVER. You are done.

Best of luck.
 
Share this answer
 
Comments
Kumar Kovuru 3-Dec-13 4:45am    
ThanQ for Your Reply...am checking now..i will get you my status later...can I have your Facebook Id..Please send it my gmail kumarkovuru@gmail.com
C@dER@j 3-Dec-13 5:46am    
reply me in my personal id rajthebestof2008@gmail.com
C@dER@j 3-Dec-13 5:48am    
One more thing if my post was useful for u don't forget to rate it. ok..
Kumar Kovuru 5-Dec-13 0:25am    
not working these too :(
C@dER@j 6-Dec-13 1:08am    
If you realy need this.Get me the teamviewer access i will do that for u.

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