FindVariables()

Clayton Arends

Member²
After using my own homegrown version of FindVariables() for the past several months I recently stumbled across it in the Oracle unit. I have a couple questions regarding this function or other functions like it (if any exist).

Is there a way to determine which variables should be declared as otSubst? My home-grown function takes two string lists and populates the first with normal variables (otString) and the second with variables that should be declared otSubst. Obviously the following variable (v2) would fit this category:

select 'blah' into :v1 from :v2

Where v2 would could contain the value 'DUAL' for example.

My second question is a general one. Why aren't the functions in the Oracle unit documented in the help? It appears that there are some valuable functions here and would require minimal documentation to explain sufficiently.

Thanks,

Clayton
 
I pressed the submit button before engaging my brain.

My home-grown function takes three string lists (not two as I previously stated). Bind variables, into variables, and substitution variables. I also strip the INTO clause from the final query.

DOA probably doesn't have a function to perform this amount of processing but my questions still stand.

Thanks,

- Clayton
 
The FindVariables function has no knowledge about the type of the variables it finds. It just returns their names and the positions within the SQL text.

The function was intended as an internal function, that's whay it is not documented. It turned that it is useful though, so it will probably be a documented feature in the next release.

------------------
Marco Kalter
Allround Automations
 
Back
Top