On 24 Jul 2015, at 2:47pm, MM <finjulhich at gmail.com> wrote:

> Is it possible to only update table1 in database1 and table2 in database2
> if both succeed?

Open one database.
Use the ATTACH command to attach the second database to the existing connection.
Use this connection for all operations on both databases.

Start a transaction using BEGIN.
Update one database, checking to see whether you get SQLITE_OK returned.
If the update failed ROLLBACK and halt.  Otherwise ...

Update the other database, checking to see whether you get SQLITE_OK returned.
If the update failed ROLLBACK and halt.  Otherwise ...

COMMIT the transaction.

Simon.

Reply via email to