Hi...
I am working on desktop application and i am using visual studio 5(2.0) with sql server 2000.
i have database on main server. how can create my connection string
such as..
SqlConnection conn = new SqlConnection();
string str = "servername.txt";
File.SetAttributes(str, (FileAttributes)FileAttributes.Normal);
StreamReader reader = new StreamReader(str);
string str2 = reader.ReadToEnd().Trim();
conn.ConnectionString = "Server = " + str2 + ";password=as;user ID=sa;Database = Elegent;";
..
i want to pass port number
like
"tcp://" + ServerName.server + ":8082/WEBIIF"
so how it is possible to pass above port in connection string.
please help...
Loading
Jignesh TrivediPosted Mar 28, 2012, 11:27 PM
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));uid=myUsername;pwd=myPassword;
please refer,
http://www.connectionstrings.com/oracle
http://www.connectionstrings.com/sql-server-2005
hope this help.
Kanhialal kkPosted Mar 28, 2012, 2:58 AM
but your reference not meets with my requirement.
so please your help is needed.
Jignesh TrivediPosted Mar 26, 2012, 4:54 AM
Please refer
http://support.microsoft.com/kb/313295
or
http://developer.mimer.com/documentation/mdp_93/Reference/source/mimer.data.client.mimerconnection.connectionstring.html
hope this help.