title: Is it possible to save multiple data to a database column
body: <p>Hi all i have my database structure as follows</p>
  
  <pre><code> Field        Type
  FileHeader    longblob
  BatchHeader   longblob
  Entry         longblob
  BtchEntry     longblob
  FileControl   longblob
  </code></pre>
  
  <p>I will have the data to be inserted is as follows</p>
  
  <pre><code>101 111111111 1111111111104021031A094101                                                      
  52201               1                   1         PPD1         110402110402   1111000020000001
  6221110000251                00000000011              1                     1 0111000020000001
  822000000100111000020000000000000000000000011                                  111000020000001
  52251               1                   1         CCD1         110402110402   1111000020000002
  6281110000251                00000000011              1                     1 0111000020000002
  822500000100111000020000000000010000000000001                                  111000020000002
  9000006000001000000060066600012000000000003000000000003                                    
  </code></pre>
  
  <p>as you can observe there are multiple lines that starts with 5,6 and 8. I would like to save those individually to the corresponding columns of my table. Is it possible to do if so can any mention the best method to do it. If unclear please specify </p>
  
  <p>The code i written is</p>
  
  <pre><code> using (StreamReader srRead = new StreamReader(filePath))
      {
          while (srRead.Peek() &gt;= 0)
          {
              strLine = srRead.ReadLine();
              if (strLine.StartsWith("1"))
              {
                  strFileHeader = strLine;
              }
              if (strLine.StartsWith("5"))
              {
                  strBatchHeader = strLine;
              }
              if (strLine.StartsWith("6"))
              {
                  strEntry = strLine;
              }
              if (strLine.StartsWith("8"))
              {
                  strBtchcntrl = strLine;
              }
              if (strLine.StartsWith("9"))
              {
                  strFileCntrl = strLine;
              }
          }
  
    string strQuery = "insert into tblfiles(FName, FData,FileHeader,BatchHeader,Entry,BtchEntry,FileControl) values (@_FName,@_FData,@_FileHeader,@_BtchHeader,@_EntryDets,@_BtchCntrl,@_FileCntrl)";
          MySqlCommand cmd = new MySqlCommand(strQuery);
          cmd.Parameters.Add("@_FName", MySqlDbType.VarChar).Value = filename;
          cmd.Parameters.Add("@_FData", MySqlDbType.LongBlob).Value = bytes;
          cmd.Parameters.Add("@_FileHeader", MySqlDbType.LongBlob).Value = strFileHeader;
          cmd.Parameters.Add("@_BtchHeader", MySqlDbType.LongBlob).Value = strBatchHeader;
          cmd.Parameters.Add("@_EntryDets", MySqlDbType.LongBlob).Value = strEntry;
          cmd.Parameters.Add("@_BtchCntrl", MySqlDbType.LongBlob).Value = strBtchcntrl;
          cmd.Parameters.Add("@_FileCntrl", MySqlDbType.LongBlob).Value = strFileCntrl;
          InsertUpdateData(cmd);
  </code></pre>
  
  <p>But this will insert the latest to the DB but i would like to save each and every line as per i stated  </p>