Page 1 of 1

Params does not work in Script

Posted: Wed 23 Jun 2010 07:20
by easyblue
// wrong posting group, please move to ODAC forum.

Hello

Please correct me if I am wrong, it seems that Params in Scripts does not work.

suppose following scripts:
//-----------------------
create table table1 as
select * from old_table1;

create table table2 as
select
*
from
old_table2
where
period_start_time >= :start_date
and period_start_time SQL->Clear();
OraScript->SQL->Add(....); // add sql scripts

SetParams(); // now I set all params
OraScript->Execute();
//-------------------

Then I found that
1. Before calling Execute(); the OraScript->Params is empty (Params->Count is 0), and I can not access to the desired params.
2. If I catch BeforeExecute event, both OraScript->Params and OraScript->DataSet->Params are also empty.

So this makes me impossible to have a script run with parameters.

Please kindly check it.

Suggested solution:
1. In the event of "BeforeExecute", the DataSet already have its Params constructed.
2. Or we can add an "BeforeExecute" event to TCustomDADataSet

Posted: Thu 24 Jun 2010 15:06
by bork
Hello

Thank you for the information. We have reproduced your issue. We will notify you as soon as we have any result.