Page 1 of 1

TOraScript - multiple select statements

Posted: Tue 30 Jun 2009 11:27
by dados
Hi, I'm wondering is you run TOraScript with multiple select statements like this:

select a, b, from table1
/
select c, d from table2

How you yould get access to each dataset?

Would you have to create a TOraQuery for each statement in the Script BeforeExecute and turn the Omit := true and run the Query your self. Is that right?

Reg,
Arni

Posted: Wed 01 Jul 2009 07:19
by Plash
If you assign TOraQuery component to the DataSet property of TOraScript, this TOraQuery is used to execute statements. After script is executed the TOraQuery component contains the result of the last SELECT statement. Results of the previous statements are not available.

If you don't assign a value to DataSet property of TOraScript, TOraScript uses TOraSQL component to execute statements. No resultsets are available in this case.

Posted: Wed 01 Jul 2009 07:26
by Plash
Yes, you can execute SELECT statements yourself, and assign True to Omit parameter.

Posted: Wed 01 Jul 2009 15:00
by dados
Plash wrote:Yes, you can execute SELECT statements yourself, and assign True to Omit parameter.
Thanks,

That's actually what I did. And it works great.