title: HDFql sequential writing to the structure dataset
body: <p>I am trying to write a simple structure in hdf5
  But I still can't add records to the already created dataset.
  The task itself is to store a set of bytes of arbitrary length and its size</p>
  <pre><code>void WriteStructToFile(vector&lt;vector&lt;char&gt;&gt; fl_stream)
  {
      struct data
      {
          int size_array;
          char * value_array;
      };
      int status;
      string  query;
      string FileName = &quot;Fly_stream_file.h5&quot;;
      string NameGroup = &quot;Stream&quot;;
      string Namedataset = &quot;Inclusions&quot;;
  
   //------------------------------- Created File and Dataset -------------
      query = &quot;CREATE TRUNCATE FILE &quot; + FileName;
      status = HDFql::execute(query.c_str());
      query = &quot;USE FILE &quot; + FileName;
      status = HDFql::execute(query.c_str());
      query = &quot;CREATE GROUP &quot; + NameGroup;
      status = HDFql::execute(query.c_str());
      query = &quot;CREATE TRUNCATE CHUNKED DATASET &quot;+ Namedataset +&quot; AS COMPOUND(size_array AS INT, value_array AS VARCHAR)(UNLIMITED)&quot;;
      stringstream scriptst;
      scriptst &lt;&lt;&quot;CREATE TRUNCATE CHUNKED DATASET &quot;&lt;&lt; Namedataset &lt;&lt;&quot; AS COMPOUND(&quot;&lt;&lt; &quot;size_array AS INT OFFSET &quot; &lt;&lt; offsetof(struct data, size_array)&lt;&lt;&quot; ,&quot;&lt;&lt;&quot; value_array AS VARCHAR OFFSET &quot;&lt;&lt; offsetof(struct data, value_array) &lt;&lt;&quot;)(UNLIMITED)&quot;&lt;&lt; &quot; SIZE &quot;&lt;&lt; sizeof(struct data);
      status = HDFql::execute(scriptst);
      //clear request
      scriptst.str(std::string());
      scriptst.clear();
  
  //--------------- Fill Dataset ----------------
      //we simulate the arrival of data in a function 
      
      
      struct data realdata;
      int number = HDFql::variableRegister(&amp;realdata);
      for (int i = 0;i &lt; fl_stream.size();i++)
      {
  
          realdata.size_array = fl_stream[i].size();
          realdata.value_array = fl_stream[i].data();
  
          //write data to the dataset
          scriptst &lt;&lt; &quot;INSERT INTO &quot; &lt;&lt; Namedataset &lt;&lt; &quot;(-1) VALUES FROM MEMORY &quot; &lt;&lt; number&lt;&lt; &quot; SIZE &quot; &lt;&lt; sizeof(struct data) &lt;&lt; &quot; OFFSET(&quot; &lt;&lt; offsetof(struct data, size_array) &lt;&lt; &quot;, &quot;
  &lt;&lt; offsetof(struct data,value_array) &lt;&lt; &quot;)&quot;;
          status = HDFql::execute(scriptst);
  
          HDFql::execute(&quot;ALTER DIMENSION Inclusions TO +1&quot;);
          scriptst.str(std::string());
          scriptst.clear();
      }
      HDFql::variableUnregister(&amp;realdata);
  status = HDFql::execute(&quot;CLOSE FILE&quot;);
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/1Ss8m.png" rel="nofollow noreferrer">the result of the corrected code</a></p>