Terminating UniScript execution

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
DepSoft
Posts: 20
Joined: Tue 27 Jul 2010 03:01
Location: Western Australia

Terminating UniScript execution

Post by DepSoft » Mon 18 Oct 2010 01:34

Hi,

Using D2010 to SQL Server 2008

I have a TUniScript executing from a thread when the application starts up. The script typically takes between 5 and 30 seconds to run. It runs the script within a single transaction.

Normally this works well except if the user decides to close the application immediately after starting it, perhaps they didn't intend to run it, etc.

How can I terminate the thread and the script cleanly and abort the transaction without waiting for the script to finish?

Thanks in advance,

Regards, Paul.

AndreyZ

Post by AndreyZ » Wed 20 Oct 2010 08:39

Hello,

You can call the BreakExec method of the TUniScript component to stop script execution.

DepSoft
Posts: 20
Joined: Tue 27 Jul 2010 03:01
Location: Western Australia

Post by DepSoft » Wed 20 Oct 2010 08:49

Thanks for that, I didn't spot that one.

Regards, Paul.

Post Reply