title: is public static sql connection secure
body: <p>I am working on a windows service in c#, and perhaps I might use the same methods in my web application if it works. The main service is using a sqlconnection that is used for itself, retrieved from app.config using ConfigurationManager, and it creates a few threads of different types, to run several tasks. Each of these threads has its own connection (stored in class property).</p>
  
  <pre><code>public partial class MainService : ServiceBase{
      private static string SQLConnStr;
      protected static SqlConnection SQLConn;
  }
  
  class OtherClass{
      private sqlconnection sqlconn;
      private string connstr;
  
  }
  </code></pre>
  
  <p>The part that I am stuck with, is that, when I create another object type, I need that object to be able to access the DB using OtherClass' connection. This new object is created and called in OtherClass for processing later on. </p>
  
  <p>Is it possible to re-use the sql connection from OtherClass?
  Is it safe and secure to make the sql connection string as public static?
  Is the design I am using not good?</p>