TOraclewwDataSet and Schema as Variable

Fabian

Member
Hello

I'm new with DOA. I have following problem:

In a DataSet I can Set the property SQL. There I use Variables.

"SELECT * FROM MYSCHEMA.MYTABLE
WHERE MYTABLE.ID=:V_ID"

But I have to change the Schema during runtime. The Tables are all the sames in all Schemas (History)

So I need something like that:
"SELECT * FROM :V_MYSCHEMA.MYTABLE
WHERE MYTABLE.ID=:V_ID"

The Schemaname should be a Variable. Is this possible? Or can I set the Schema on the OracleSession component?

Thanks for help

regards Fabian
 
This is possible, but you must declare the :v_myschema variable as a substitution variable (otSubst).

Substitution variables are replaced by their value in the SQL text before the statement is sent to the server, which is a requirement when using a variable like this.
 
Back
Top