> > > My question was a little different. > > > I am developing desktop application which utilizes SQLite. At some > > > point in time my customer will want to know what happen when the DB > > > operation breaks.
> > This depends on your definition of "breaks". > Let me give you an example. > I start the transaction, do couple of inserts and then I get an I/O error. > In this case I need to rollback tell the user about failure and go back to > the screen I started the transaction from. > Or the simplest one - the database is moved and inaccessible. If it > happens on the start, just tell the user and exit the program. If it happens > during the program execution, again tell the user that current operation > failed > and go back to the screen that originated the operation. Both of these should be fatal. As should things like running out of memory. You cannot "recover" from these sorts of errors and when you come upon them your application should detect that there is an error condition that cannot be recovered and stop. There is no way that you application can deal gracefully with these errors. If the application flow is well designed, then your data will be preserved (well, maybe not in the case of an I/O error, depending on what the underlying cause is). However, it is unsafe for the application to ignore the error and continue. ACID should prevent your data from being corrupted or inconsistent, if that is at all possible (depending on the error). However, there is nothing that *your application* can do when faced with such an error except to crash. Maybe the error is transient and will not appear when you restart the application. Maybe a sector went bad in the middle of file and you can do nothing except replace the disk and restore the database from backup. An ABEND is a perfectly valid response to an unexpected error condition and prevents things from being made *worse* after an error occurs. --- () ascii ribbon campaign against html e-mail /\ www.asciiribbon.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users