Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 13 total
Thread EDBMgr thinks script still running after error and cancel
Wed, Sep 17 2008 3:35 PMPermanent Link

"David Cornelius"
With EDB Mgr 2.01 b5 in place, I was running a script that created a
lot of tables, then started filling them with data.  I was still
building the script and knew there were a few problems, but decided to
let EDB Mgr tell me where they were (hundreds of generated lines).

When an error stopped the script, I noticed the Cancel button was still
enabled.  So I clicked it to stop the script, but nothing changed.  My
intention was to fix the script and re-run it (after deleting the
tables). I clicked it several times and finally had to close the script
and reload it in order to "clear" EDB Mgr from thinking it was still
running the script.

A couple of times, it even caused an error in EDB Mgr which required a
forced "end task" from Task Manager, but I can't reproduce it
consistently.

Another thing I tried was to simply hit Cancel while the script is
running, but that didn't seem to do anything.  I tried both on a
successful scripted (which finished successfully) and on a broken
script which eventually errored.  In both cases, the cancel button
seemed to have no affect whatsoever.

(I almost put "Cancel doesn't work in EDB Mgr" as the subject line, but
the not being able to clear the error caused me the most trouble last
night.)

--
David Cornelius
CorneliusConcepts.com
Thu, Sep 18 2008 5:57 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

David,

<< When an error stopped the script, I noticed the Cancel button was still
enabled.  So I clicked it to stop the script, but nothing changed.  My
intention was to fix the script and re-run it (after deleting the tables). I
clicked it several times and finally had to close the script and reload it
in order to "clear" EDB Mgr from thinking it was still running the script.
>>

I knew this was going to cause confusion and should have probably clarified
it.  The Cancel button is not the same as stopping the script, which is done
via the Stop option on the script execution menu.  The Cancel button works
the same as setting Continue=False in a TEDBScript.OnProgress event handler,
and only works if the script actually sends progress events via the SET
PROGRESS SQL/PSM statement.  Otherwise, the Cancel button won't do anything.
The Stop menu item, on the other hand, will stop the script dead in its
tracks like a Reset does in the Delphi IDE.  The reason for this minor
distinction is so that you can debug scripts that do progress updates and
still allow for also debugging the proper handling when a user cancels the
script execution.

<< A couple of times, it even caused an error in EDB Mgr which required a
forced "end task" from Task Manager, but I can't reproduce it consistently.
>>

Which error message are you referring to ?  Closing any script window with a
script execution in progress should simply result in a prompt asking if you
want to really stop debugging the script.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Sep 18 2008 6:43 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


>via the Stop option on the script execution menu.

Can you tell me where this is please?

Roy Lambert
Thu, Sep 18 2008 7:34 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Can you tell me where this is please? >>

Main menu/Script/Stop

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Sep 18 2008 8:08 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


I'm sure it wasn't there when I looked just before posting Smiley

Roy Lambert
Thu, Sep 18 2008 9:44 AMPermanent Link

"David Cornelius"
> I knew this was going to cause confusion and should have probably
> clarified it.  The Cancel button is not the same as stopping the
> script, which is done via the Stop option on the script execution
> menu.  The Cancel button works the same as setting Continue=False in
> a TEDBScript.OnProgress event handler, and only works if the script
> actually sends progress events via the SET PROGRESS SQL/PSM
> statement.  Otherwise, the Cancel button won't do anything. The Stop
> menu item, on the other hand, will stop the script dead in its tracks
> like a Reset does in the Delphi IDE.  The reason for this minor
> distinction is so that you can debug scripts that do progress updates
> and still allow for also debugging the proper handling when a user
> cancels the script execution.

OK, that makes sense--and is good to know.  But this particular script
has SET PROGRESS TO statements all the way through it.  There are about
60 tables and I have a progress statement after each.  I hit Cancel
several times right after the script started and it never stops.

--
David Cornelius
CorneliusConcepts.com
Thu, Sep 18 2008 9:51 AMPermanent Link

"David Cornelius"
> << A couple of times, it even caused an error in EDB Mgr which
> required a forced "end task" from Task Manager, but I can't reproduce
> it consistently.  >>
>
> Which error message are you referring to ?  Closing any script window
> with a script execution in progress should simply result in a prompt
> asking if you want to really stop debugging the script.

This was not a typical nice error message where I can look it up in the
appendix, but something like an application violation or something (I
forget).  Yes, I did get the "stop debugging?" question, but a few
times, it crashed beyond that.  I'll write it down next time I see it.

--
David Cornelius
CorneliusConcepts.com
Thu, Sep 18 2008 9:59 AMPermanent Link

"David Cornelius"
> OK, that makes sense--and is good to know.  But this particular script
> has SET PROGRESS TO statements all the way through it.  There are
> about 60 tables and I have a progress statement after each.  I hit
> Cancel several times right after the script started and it never
> stops.

Oh, and the Stop menu item is disabled.  But I see now that Stop is
only enabled when there are breakpoints set and the program stops on a
breakpoint.  There were no breakpoints in the script for my original
question.

--
David Cornelius
CorneliusConcepts.com
Thu, Sep 18 2008 10:45 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

David,

<< OK, that makes sense--and is good to know.  But this particular script
has SET PROGRESS TO statements all the way through it.  There are about 60
tables and I have a progress statement after each.  I hit Cancel several
times right after the script started and it never stops. >>

The SET PROGRESS TO just gives the user the ability to cancel the script,
but the script itself must respond to this situation by looking at the
Aborted() function:

http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=23&topic=501

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Sep 18 2008 10:50 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

David,

<< Oh, and the Stop menu item is disabled.  But I see now that Stop is only
enabled when there are breakpoints set and the program stops on a
breakpoint.  There were no breakpoints in the script for my original
question. >>

That's definitely not true.  The Stop menu item is enabled whenever the
script is executing (debugging).  I just tried it with this script:

SCRIPT
BEGIN
  DECLARE Done BOOLEAN DEFAULT False;
  DECLARE TotalRows INTEGER DEFAULT 0;
  DECLARE TestVar VARCHAR(30) DEFAULT '';
  DECLARE TestCursor CURSOR WITH RETURN FOR TestStmt;

  PREPARE TestStmt FROM 'SELECT Category FROM _biolife';  -- Error here

  OPEN TestCursor;

  WHILE (NOT EOF(TestCursor)) DO
     FETCH NEXT FROM TestCursor INTO TestVar;
     SET TotalRows=TotalRows+1;
     SET PROGRESS TO TRUNC((TotalRows/ROWCOUNT(TestCursor))*100);
  END WHILE;

  CLOSE TestCursor;
END

The debugger stops on the error, and I can then click on the Stop menu item
and terminate the script completely.

--
Tim Young
Elevate Software
www.elevatesoft.com

Page 1 of 2Next Page »
Jump to Page:  1 2
Image