I have inherited a Windows Service program written in C# that under certain conditions does an OdbcConnection.Dispose():-

Code:
        catch (InvalidOperationException Ex)
        {
            //make sure the connection is left in a completely closed state
            cmdTP.Connection.Close();
            cmdTP.Connection.Dispose();
        }
The service is on a Timer and executes every 5 minutes. So the next time the service kicks in (after the error) I want it to attempt to completely reopen the connection. However, when I try to simply Open() the connection I get an error indicating that the connectionString has been lost. How do I rewrite the following code to reestablish the connection string?

Code:
        public const string TP00ConString = "Driver=" + ODBCDriver + "; Server= .... etc ....";
        public static OdbcConnection conTP = new OdbcConnection(TP00ConString);
        public static OdbcCommand cmdTP = new OdbcCommand();

        ...

        try
        {
            //open the write connection
            cmdTP.Connection = conTP;
            cmdTP.Connection.Open();
        }
Thanks