Scan SQL to retrive variables in runtime

Morff

Member²
Hi
In variables editor there is a "Scan SQL" button which fills variables collection from sql command. I need create variables automatically after append sql command to oracledataset. How can I do that.
 
In the Oracle unit there is a published function like this:

function FindVariables(const SQL: string; IncludeDuplicates: Boolean): TStringList;

This function will scan the SQL parameter for variables and will return them in a TStringList. The IncludeDuplicates parameter determines if duplicate variables will be included or not.

 
I thought it can be:

OracleDataSet.sql.append(memo1.text);

// oracledataset.RetrieveVariables or oracledataset.Parse or something like that

if OracleDataSet.Variables.count > 0 then
// Show value list editor with variables

but FindVariables can help

Thanks a lot.
 
Back
Top