Weird Delphi variable question
Posted on 2011-09-12
I have a question about whether or not an idea I have for making some code dynamic is actually possible.
In my code I'm building a filename by piecing together elements I receive back from a SQL query. The query would return a 'variable name' which would match up to an actual variable in my code. Can I somehow access the value of the REAL variable based on what name is returned from the query?
gsDCN := '123456789';
sReturnedValue := 'gsDCN'; //would actually be returned from SQL query
sOutputString := <value from the variable named in sReturnValue> + '.XML';
Is this possible? Maybe another method to accomplish this?
Thanks for any time spent on this.