title: Data is not saving permanently in my localdatabase
body: <p>I would like to know why my data is not saving permanently in my local database. If I close my application and open it again. I cannot download the uploaded data. Its showing an error called <strong>"The given key was not present in the dictionary”</strong>
  But I can download the file when the application is running. I mean, if the application is running and I upload a data to my grid, then download it its not throwing any error. If the application is closed and opened, that time if I try to download the same old file its throwing the error</p>
  
  <p>My code</p>
  
  <pre><code>private void DownloadAttachment(DataGridViewCell dgvCell)
  {
      string fileName = Convert.ToString(dgvCell.Value);
  
      //Return if the cell is empty
      if (fileName == string.Empty)
          return;
  
      FileInfo fileInfo = new FileInfo(fileName);
      string fileExtension = fileInfo.Extension;
  
      byte[] byteData = null;
  
      //show save as dialog
      using (SaveFileDialog saveFileDialog1 = new SaveFileDialog())
      {
          //Set Save dialog properties
          saveFileDialog1.Filter = "Files (*" + fileExtension + ")|*" + fileExtension;
          saveFileDialog1.Title = "Save File as";
          saveFileDialog1.CheckPathExists = true;
          saveFileDialog1.FileName = fileName;
  
          if (saveFileDialog1.ShowDialog() == DialogResult.OK)
          {
              cncInfoDataGridView.Rows[dgvCell.RowIndex].Cells[1].Value = fileInfo.Name;
              byteData = _myAttachments[dgvCell.RowIndex];
              File.WriteAllBytes(saveFileDialog1.FileName, byteData);
          }
      }
  }
  </code></pre>