Page 1 of 1

Can I cancel?

Posted: Fri Aug 28, 2009 3:29 pm
by Rathinagiri
Hi,

Suppose I start a time consuming operation (say indexing some 50 BIG tables) and I want to interrupt/cancel in between.

How can we do that? Can we have a button to interrupt and stop a running function?

Regards,

S. Rathinagiri.

Re: Can I cancel?

Posted: Fri Aug 28, 2009 3:43 pm
by Roberto Lopez
rathinagiri wrote:Hi,

Suppose I start a time consuming operation (say indexing some 50 BIG tables) and I want to interrupt/cancel in between.

How can we do that? Can we have a button to interrupt and stop a running function?

Regards,

S. Rathinagiri.
It depends on function.

If you are talking about you own function (ie: indexing tables) you could use DO EVENTS between calls to DBCREATEINDEX() function.

If you mean interrupt DBCREATEINDEX() function itself, I'm not sure. Perhaps...

Code: Select all

 DBCREATEINDEX(<cIndexName>, <cKeyExpr>,
        [<bKeyExpr>], [<lUnique>]) --> NIL
...
<bKeyExpr> is a code block that expresses the index key expression in executable form
...using a 'tricked' <bKeyExpr> including a call to ProcessMessages().

Anyway, I've never used <bKeyExpr> parameter, so, I don't know if it is possible

Regards,

Roberto

Re: Can I cancel?

Posted: Fri Aug 28, 2009 5:09 pm
by Rathinagiri
Oh! Thanks for the tip Roberto. :)

I wanted to break my own function many times. :)