Trouble writing values from database to INI file
<p>I am trying to write values in an .ini file. I have made the connection to the database and can get the data but for the life of me I cannot get it to output correctly in the .ini file. I would like the output to be:</p>

<pre><code>Row1 = column1 value - column2 value
Row2 = column1 value - column2 value
Row3 = column1 value - column2 value
</code></pre>

<p>.</p>

<pre><code>//xcount is number of records in the data table
int xcount;
int primary;
primary = int.Parse(deviceNumTextBox.Text);
// get the data

if (primary == 99)
{
    xcount = int.Parse(countLabel1.Text);
    for (int t = 0; t &lt; xcount; t++)
    {
        int j = 0;

        da.Fill(dt);
        foreach (DataRow row in dt.Rows)
        //foreach (DataRow row in dt.Rows)
        {
            string str;
            string nfloatAmt = (string)row[0];
            string ndeviceNum = (string)row["deviceNum"];
            //using (TextWriter writer = new StreamWriter("test.txt", true))  // true is for append mode
            //{

            //}
            j++;
            str = "ROW " + j.ToString() +row["floatAmt"].ToString() + "^" + row["deviceNum"].ToString();
            source.Configs["STORE"].Set("FLOAT"+t, str );
        }
    }
}
</code></pre>

<p>Any help would be greatly appreciated.</p>
