SOConnection connection string format

  • 25 February 2009
  • 2 replies
  • 1 view

Badge +5

Greetings.  Is the connection string format for the SOConnection object's connection string property different than what the SCConnectionStringBuilder object returns?  Anyone have an example string?


 I'm using the following:


string connString = "<my connection string goes here>";
using(SOConnection conn = new SOConnection(connString))
{
     ....
}


One of the SOConnection constructors allows for SOConnection(string server, int port) but I cannot use this at the moment so I need to use the

SOConnection(string connectionstring)  format.  Thanks.


2 replies

Badge +5

I spoke too soon.  You can get an example by manually setting each connection property and then checking the ConnectionString property. 


conn.Port = 5555;
conn.Server = "serverName";
....


 

Badge +9

There are some example connection strings here also:

http://k2underground.com/blogs/fromthebench/archive/2008/04/29/misc-k2-blackpearl-connections-strings.aspx

 

Reply