In case you weren't already planning to, you'll probably also
want to wrap your original query in an eval block to trap any errors.
Then use the suggestions below to undo any incomplete "transactions".
This will also help prevent any other errors that might creep in
between inserts/updates from leaving your DB in an inconsistent state.
It's not nearly ideal, but unless you want to switch to an
ACID compliant RDBMS, it's about the best you can do.
Mike
Mike<mickalo>Blezien ([EMAIL PROTECTED]) wrote:
> On Sun, 11 Mar 2001 22:53:30 -0500, "Sterin, Ilya" <[EMAIL PROTECTED]> wrote:
>
> Yes, MySQL does, using BDB Berkely tables. Which we don't have. Appreciate the
> suggestions.
>
> Thanks,
>
> >>I believe the latest version of mysql does finally support transactions...,
> >>but if upgrade is not an option, depending on how dynamic your queries are,
> >>it might be easy to just create an array of rollback queries, meaning
> >>delete... update... to the previous db state and then execute all or how
> >>ever many needed to go back to previous data. I would keep a counter and
> >>depending on what do() command number it is, loop the array of undo queries
> >>that many time for that many indexes.
>
> Mike(mickalo)Blezien
> ========================================
> Thunder Rain Internet Publishing
> Providing Internet Solutions that work!
> http://www.thunder-rain.com
> Tel: 1(225) 686-2002
> =========================================
>
--
Mike Slack
[EMAIL PROTECTED]
http://www.aworldthatworks.com/
--
"If we knew what it was we were doing, it wouldn't
be called research, would it?" --Albert Einstein