handling database connection issues
<p>I have some code that needs to retry whenever it cannot make a database connection, for example 20 times for each login.  The website has dozens of users, what would be the best way to handle this?  I was thinking of using a counter but as multiple users will be logged on at the same time perhaps some threading would be required, which I am unfamiliar with.</p>

<p>EDIT :</p>

<p>I get the error 'method name expected' on the line where I am instantiating the Thread object.  Here is my code :</p>

<pre><code>private static List&lt;Field.Info&gt; FromDatabase(this Int32 _campId)
    {
        List&lt;Field.Info&gt; lstFields = new List&lt;Field.Info&gt;();

        Field.List.Response response = new Field.List.Ticket
        {
            campId = _campId
        }.Commit();

        if (response.status == Field.List.Status.success)
        {
            lstFields = response.fields;
            lock (campIdLock)
            {
                loadedCampIds.Add(_campId);
            }
        }

        if (response.status == Field.List.Status.retry)
        {
            Thread th1 = new Thread(new ThreadStart(FromDatabase(_campId)));

            FromDatabase(_campId);
        }

        return lstFields;
    }
</code></pre>
