how to fix my connection class?
<p>Im newbie in C#</p>

<p>I put my database connection to a class: </p>

<pre><code>public class Connection
{
    public string SetConnection()
    {
        string connectionstring = "server=SURI-PC;database=cms;Integrated Security=True";
        return connectionstring;
    }
}
</code></pre>

<p>then, I call it in main class:</p>

<pre><code>public static void Main(string[] args)
{
    Connection conObject = new Connection();
    SqlConnection scon = new SqlConnection(conObject.SetConnection());
    String sql = "insert into category(cat_id, cat_name) values('C03', 'Browser')";
    SqlCommand cmd = new SqlCommand(sql, scon);
    cmd.ExecuteNonQuery();
}
</code></pre>

<p>But it isnt work. </p>

<p>How to create a connection class and call it in others class?</p>

<p>Please help me!</p>

<p>thanks.</p>
