.replace replacing wrong values
<p>I am working on a method that creates a string builder called SQL and using SQL.Replace to replace parts of that with values.</p>

<p>During debug the values are what they should be. Until i get to the .WriteToDatabase(SQL.ToString()); part then the values seem to be replaced with the number i have assigned to them.</p>

<p>So for example I have string shift this = morning shift until i get to .WriteToDatabase.
I have tried replacing the positining in string builder and in Sql with no joy.
Code</p>

<pre><code> public static void InsertPumaLadleControlProcessMonitoring(string ladleNo, string shift1, string LadleTemp, string Source, string Destination1, string Destination2, string Destination3, string Destination4, string pourTime, string RodsTibor, string Rodsr, string chunksMg, string DegasCycleTime, string Denisty, string OOT)
    {
        try
        {
            string operatorID = clsPublic.loggedInUserId;
            StringBuilder SQL = new StringBuilder(System.Configuration.ConfigurationManager.AppSettings.Get("InsertPumaLadleControlProcessMonitoring"));
            SQL = SQL.Replace("param1", ladleNo);
            SQL = SQL.Replace("param2", LadleTemp);
            SQL = SQL.Replace("param3", Source);
            SQL = SQL.Replace("param4", Destination1); 
            SQL = SQL.Replace("param5", Destination2);
            SQL = SQL.Replace("param6", Destination3);
            SQL = SQL.Replace("param7", Destination4);
            SQL = SQL.Replace("param8", pourTime);
            SQL = SQL.Replace("param9", Rods);
            SQL = SQL.Replace("param10", Rodsr);
            SQL = SQL.Replace("param11", chunksMg);
            SQL = SQL.Replace("param12", DegasCycleTime);
            SQL = SQL.Replace("param13", Denisty);
            SQL = SQL.Replace("param14", OOT);
            SQL = SQL.Replace("param15", shift1);

            clsPublic.sqlDB.WriteToDatabase(SQL.ToString());
        }
        catch (Exception e)
        {
            //clsPublic.appLog.Error("Cannot add Record");
            //throw new Exception("Cannot add record");
            MessageBox.Show("Cannot Add Record" + e);
        }
    }
</code></pre>

<p>So Shift 1 is = Moring Shift but it seems to be changing to 15 when it gets to .WriteToDatabase(SQL.ToString());
Anyone Any ideas? Thanks</p>
