TOraScript - multiple select statements

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dados
Posts: 82
Joined: Thu 18 Aug 2005 14:06

TOraScript - multiple select statements

Post by dados » Tue 30 Jun 2009 11:27

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 01 Jul 2009 07:19

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.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 01 Jul 2009 07:26

Yes, you can execute SELECT statements yourself, and assign True to Omit parameter.

dados
Posts: 82
Joined: Thu 18 Aug 2005 14:06

Post by dados » Wed 01 Jul 2009 15:00

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.

Post Reply