hi iam using sql server 2000 , with asp.net2.0 with c#
in my client machine how to read the Data Source value from client system
user id , password ,database name is same for all clients but how to get Data Source value in connection string .
can you give example which helps me
Loading
bala muruganPosted Jul 7, 2010, 7:37 AM
used through webconfic file ..
1.open the webconfic file and select the connection string location
2.create like
3.using name space Using System.Configuration;
4.after coding place
string strcon = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
bala muruganPosted Jul 7, 2010, 7:31 AM
first you declare the namespace
Using System.Data.sqlclient;
Using System.Data;
after you used like..
" SqlConnection con = new SqlConnection("Data Source=server2;Initial Catalog=Test;User ID=testuser;Password=User###");"
how to select datasource is( the server explorer open and create one database after the right click the database and select the properties and copy the connectionstring values from property toolbar)
thanks
balas