Design a tempTable in class to hold a "matrix" of values

In another post I got to, by the great help of Martin, a solution with a TempTable to hold values.

In post https://dynamicsuser.net/ax/f/developers/96205/memory-not-cleaned-with-struct you can see the discussion

So I want to create a class of a TempTable and then GetSettermethods to get and set the values in the table.

If I'm not wrong I can do that by (assume I created a class of type TempTable named "Commodity" 

public real parmOpen(int _id, real _open = 0)
{

//update value

if(_open != 0)

{

select forupdate Commodity where Commodity.id == _id;
commodity.open = _open;

commodity.update();

}

return commodity::find(_id).open;

}

Wrote it form the top of my head, but its about the concept.

What do you think?

Parents Reply
  • You said you want to store Bid, Ask and Open in a single record, but I argue that using three records is easier. I wonder if you have stronger arguments for your design than that you want.

    Interesting, let's discuss this first.

    Why is 3 separate records per _id easier than 1 record with different fields?

    Actually in full implementation it would be then 28 records per _id instead of 1 record with 28 fields.

    I designed it this way because I'm used to save data per _id. (Like custtable or inventtable

    But I'm open for a better design, however I don't grab it yet.

    Pls explain

Children
Related
Recommended