Subject | Re: [IBO] Ability to run a script "step by step" |
---|---|
Author | Martijn Tonies |
Post date | 2006-10-20T09:50:04Z |
> >Right ;-)But not _that_ easy ;-)
> >I'll have a go -- let me see what would be the easiest way...
>
> It`s really easy ;)
As this doesn't do what I want completely, it's a start though.
Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> var FAbortScriptFlag:boolean=False; // global unit or class
> variable
>
> //-------------
> Procedure MyForm.ExecuteScriptByStep;
> Begin
> MyScript.OnStatement:=OnScriptStatement;
> MyScript.Execute;
> End;
> //-------------
>
> Procedure MyForm.OnScriptStatement(Sender: TIB_Script; var
> Statement: String; var SkipIt: Boolean); Begin
> if FAbortScriptFlag then SkipIt:=True
> else case MessageBox(Application.Handle,PChar('Execute
> this:'+Statement),'Confirmation',MB_YESNOCANCEL) of
> IDYES :SkipIt:=False; // continue execute
> IDNO :SkipIt:=True; // skip statement but
> continue execute script
> IDCANCEL:begin
>
> SkipIt:=True; // skip statement
> FAbortScriptFlag:=True; // skip
> all below statement too (auto skip all statements in script later)
> {
> these you can use
> TIB_Script.AbortExecuting() method too
> }
> end;
> end;
> End;