Can I cancel?

Creative ideas/suggestions for HMG

Moderator: Rathinagiri

Post Reply
User avatar
Rathinagiri
Posts: 5161
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 127 times
Been thanked: 129 times
Contact:

Can I cancel?

Post by Rathinagiri » Fri Aug 28, 2009 3:29 pm

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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
Roberto Lopez
HMG Founder
Posts: 3899
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 135 times

Post by Roberto Lopez » Fri Aug 28, 2009 3:43 pm

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
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Rathinagiri
Posts: 5161
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 127 times
Been thanked: 129 times
Contact:

Post by Rathinagiri » Fri Aug 28, 2009 5:09 pm

Oh! Thanks for the tip Roberto. :)

I wanted to break my own function many times. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

Post Reply