Array of const to database and back

Array of const to database and back

I've made some research but didn't found anything related to this. What is the issue i'm facing: old application was using lots and lots of routines in order to use Format function and have arrays of const as parameters. Formated strings were stored in a database. Now I need to split those strings in 'unformatted' text and the arrays of const used to format the strings. The problem I have is that I couldn't store the array of consts in a string or stream field. How can be an array of const can be stored in a field and builded back again from database? Any hints are appreciated

Comments

  1. The array of const is an array of TVarRec. Set the length of a TVarRec variable and define each field. Then pass it in the Format function. How you define each field of the TVarRec is difficult to say with information given in the question. See also stackoverflow.com - How do I build an array of const?

    ReplyDelete
  2. Serialize as JSON array, for each TVarRec store type and value. Save the resulted JSON as a string in DB.

    ReplyDelete

Post a Comment