Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 27th, 2007, 03:01 AM
Authorized User
 
Join Date: Mar 2007
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to erictamlam Send a message via MSN to erictamlam Send a message via Yahoo to erictamlam
Default How to get IP address in C# programme?

hey all
I made a programme connected to Database and the connection string is as follows:
connection = new SqlConnection("Data Source=eric;Initial Catalog=ClientService;Integrated Security=True");
Now I backuped the database "ClientServer" and restore it on another comp.of course when I ran this programme again,error would pop up cuz datasource is no longer "eric".so is there a way that I can get the IP address of the comp on which this programme runs and connect to database "ClientServer" through IP address?Then wherever I run this programme again,IP address of the comp will automatically be assigned to Data Source.
great appreciation for your kind help,kinda urgent.


ERIC
__________________
ERIC
 
Old May 27th, 2007, 09:42 PM
Registered User
 
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can get the answer through huntting for the key words






Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me i must Get IP Address pla_2 C# 2005 2 October 12th, 2006 07:51 AM
IP Address sumanghosh Classic ASP Basics 1 April 7th, 2006 11:24 AM
How to get IP address shankhan Classic ASP Databases 6 March 10th, 2005 04:18 PM
Retreiving IP address & gateway address sjangit VBScript 0 February 3rd, 2004 02:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.