Howto change SQL-Statement in BeforeExecute?
Posted on 2004-04-21
In my AppServer I have a TDataSetProvider and a TOracleDataSet.
Frequently my client executes an SQL-Statement which is almost always
something like 'select * from some_table'
Now I would like to include access restrictions into this statement, so that
only those rows are queried that should be readable by the user.
Building the statement is no problem, but it seems that TOracleDataSet.SQL
cannot be changed in BeforeExecute.
Ideally, BeforeExecute is the right place for me to change the statement, but
so I have to do it somewhere else?
Someone told me that it has to be done before the statement is 'prepared'.
When would that be?
P.S: I cannot rely on the database to handle such restrictions, I have to do
it in code.