"Allan, Mark" <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> We would like to be able to show a (reasonably) accurate progress bar =
> when we are deleting a large number of records from our database. Is =
> there a way in which this can be done. We are using SQLite version =
> 3.2.7. I have had a look at the sqlite3_progress_handler() API function =
> but it appears that the problem is knowing how many opcodes are required =
> to complete the transaction before it is run. 
> 

You can use a SELECT to count the number of records to be
deleted.  Then start your progress bar and do separate
SQL statements to delete each record one-by-one, updating
your progress bar as you go.

The sqlite3_progress_handler() does not know in advance
how many opcodes need to run in order to complete the 
operation, so you cannot use it to get a %-complete
progress bar.
--
D. Richard Hipp   <[EMAIL PROTECTED]>

Reply via email to