Can I cancel?

Creative ideas/suggestions for HMG

Moderator: Rathinagiri

Post Reply
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Can I cancel?

Post 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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Can I cancel?

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

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Can I cancel?

Post by Rathinagiri »

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