Ability to run a script statement-by-statement

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

Ability to run a script statement-by-statement

Post by upscene » Thu 19 Oct 2006 08:17

Hi,

I would like to request a feature that allows you to run a script statement-by-statement.

This could be done, i guess, by creating a "run mode" or something like that (RunAll or RunPerStatement) and events that tell you which statement (and line this statement is on) is the current and allow you to continue/stop.

Obviously, if the MySQL components could have such a change as well, the better :)


--
Martijn Tonies
Upscene Productions

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Fri 20 Oct 2006 07:29

You can implement such functionality by using BeforeExecute event handler and Omit parameter in it. In the nearest future we will release new versions of ODAC and MyDAC with the script component that has more functionality.

upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

Post by upscene » Fri 20 Oct 2006 08:21

challenger wrote:You can implement such functionality by using BeforeExecute event handler and Omit parameter in it. In the nearest future we will release new versions of ODAC and MyDAC with the script component that has more functionality.
I fail to see how you can implement such a thing by using that event.

I don't want to omit anything, I want to execute a statement, get some kind of feedback as on which line the script is now, then stop execution.

--
Martijn Tonies
Upscene Productions

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Fri 20 Oct 2006 09:14

TOraScript has StartPos, EndPos, StartLine, EndLine properties that show information for current statement. So you can use these properies in OnBeforeExecute event handler. You can stop execution by setting Omit to True for all statements starting from current one. Another way is calling ExecuteNext method while some flag is True instead of calling Execute method.

upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

Post by upscene » Fri 20 Oct 2006 09:48

challenger wrote:You can stop execution by setting Omit to True for all statements starting from current one.
That's an interesting way of implementing it :)

I'll see what I can do, I'm, however, very interested in the more advanced script component and feedback for it.

--
Martijn Tonies
Upscene Productions

jfudickar
Posts: 202
Joined: Fri 10 Mar 2006 13:03
Location: Oberursel / Germany

Post by jfudickar » Fri 20 Oct 2006 10:45

I think a lot more of people are interested :)

Post Reply