Click here to Skip to main content
15,922,894 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi
let us consider application runs in machine 1 and sql database runs in machine 2
and my problem is i need to insert the values from application to database ..[via tcp/ip] and i too configured it in sql server configuration manager.

give me some samples regarding it
and how we have to configure in connection strings


waiting for your responses
Posted
Updated 11-Jul-12 3:37am
v2
Comments
[no name] 11-Jul-12 9:39am    
Is google broken where you live? If the search function for the CodeProject website is broken, you should probably report it to the proper people.
gowthammanju 11-Jul-12 9:45am    
wat a tradegy @wes Aday i tried many and finally i started posting here
[no name] 11-Jul-12 9:50am    
How do you expect anyone here to know what you have tried? You did not even bother posting a connectionstring that you have tried or any code that you have tried that is giving you errors! We cannot see your code, know what you are doing or read your mind! There are millions of examples on the internet to accomplish this very simple basic task and you could not find a single one?
gowthammanju 11-Jul-12 10:20am    
@Wes Aday u bitch! connecting database with .net and getting connection string is a basic thing @darsan spotted correctly that system must be in network....if u know just give some idea or else shut and sit......

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
gowthammanju 11-Jul-12 9:44am    
for accessing from database in machine 2 and application from machine 1 it is not connected through that approach whice i accessed already
Hi,

If both of your machines are in network then you can Use SQL authentication of SQL Server in the connection string of the SQL Connection and continue the application as you develop normally.

Regards,
Darshan.
 
Share this answer
 
Comments
gowthammanju 11-Jul-12 10:21am    
ya thanks it is problem with network connected to that machine is not proper !

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