john230873
Programmer
I have some code that I am writing to read data from Pervasive tables. The structure of the tables are always changing so I thought it would be good if I could read the field names at run time and create a record on the fly. Is it possible?
currently I have some code like this
STYLE_STRUCT = packed record
STYLE : Integer;
ITEM_SIZE : ARRAY[0..3] of char;
COLOUR : smallint;
STOCKP_NUMBER : Integer;
COLOUR_NUMBER : smallint;
BIN : ARRAY[0..3] of char;
PHOTO : ARRAY[0..0] of char;
LAST_SALE_DATE : integer; //date
LAST_REC_DATE : integer; //date
QTY_PURCHASED : Integer;
QTY_SOLD : Integer;
end;
but I would pefer if this struct could be changed during runtime so if the Style Table format changes then the program will change as well.
Something like what the TTable do with fields how you can add them at anytime.
I can't use a TTable as for pervasive you need DDF's and we don't have any.
currently I have some code like this
STYLE_STRUCT = packed record
STYLE : Integer;
ITEM_SIZE : ARRAY[0..3] of char;
COLOUR : smallint;
STOCKP_NUMBER : Integer;
COLOUR_NUMBER : smallint;
BIN : ARRAY[0..3] of char;
PHOTO : ARRAY[0..0] of char;
LAST_SALE_DATE : integer; //date
LAST_REC_DATE : integer; //date
QTY_PURCHASED : Integer;
QTY_SOLD : Integer;
end;
but I would pefer if this struct could be changed during runtime so if the Style Table format changes then the program will change as well.
Something like what the TTable do with fields how you can add them at anytime.
I can't use a TTable as for pervasive you need DDF's and we don't have any.