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
|