9 Jun
2005

ConnectionBuilder in ADO.Net 2.0

This is a blatant ripoff from Aaron Skonnard, but I have to quote it to get across
the idea of the post.  Check this new class out, very sweet.

SqlConnectionStringBuilder
connbuilder = new SqlConnectionStringBuilder();
connbuilder.DataSource = “localhost”;
connbuilder.UserID = “someuser”;
connbuilder.Password = “somepassword”;
SqlConnection c = new SqlConnection (connbuilder.ConnectionString);
c.Open();

// do something with the connection
 

Links