Cannot convert object to a string
<p>I have encrypted every item in MS Access file using AES. Encryption works great. The problem is that I am getting an error: <code>Argument 1: cannot convert from 'object' to 'string'</code> On lines like these: <code>security.Decrypt(readPersonalData.GetValue(1), storedAuth.Password, storedAuth.UserName)</code></p>

<p>How can I avoid this?</p>

<pre><code>        if (readPersonalData.HasRows)
        {
            while (readPersonalData.Read())
            {
                // Count all entries read from the reader.
                countEntries++;


                txtDisplay.Text += "=== Entry ID: " + readPersonalData.GetValue(0) + " ===" + Environment.NewLine;
                txtDisplay.Text += "Type: " + security.Decrypt(readPersonalData.GetValue(1), storedAuth.Password, storedAuth.UserName) + Environment.NewLine;
                if (!readPersonalData.IsDBNull(2)) txtDisplay.Text += "URL: " + security.Decrypt(readPersonalData.GetValue(2), storedAuth.Password, storedAuth.UserName) + Environment.NewLine;
                if (!readPersonalData.IsDBNull(3)) txtDisplay.Text += "Software Name: " + security.Decrypt(readPersonalData.GetValue(3), storedAuth.Password, storedAuth.UserName) + Environment.NewLine;
                if (!readPersonalData.IsDBNull(4)) txtDisplay.Text += "Serial Code: " + security.Decrypt(readPersonalData.GetValue(4), storedAuth.Password, storedAuth.UserName) + Environment.NewLine;
                if (!readPersonalData.IsDBNull(5)) txtDisplay.Text += "User Name: " + security.Decrypt(readPersonalData.GetValue(5), storedAuth.Password, storedAuth.UserName) + Environment.NewLine;
                if (!readPersonalData.IsDBNull(6)) txtDisplay.Text += "Password: " + security.Decrypt(readPersonalData.GetValue(6), storedAuth.Password, storedAuth.UserName) + Environment.NewLine;
                txtDisplay.Text += Environment.NewLine;
            }
        }
</code></pre>
