
MSRDC Remote data object question...
wrote these mellifluous words, full of wisdom and thoughtful reflections:
Quote:
>!<How can I do some kind of "rollback" or "undo" when I'm updating a form
>!<populated by TextBox controls linked on a MSRDC control without having to
>!<do a lot of coding. What I try to do is to have a "Cancel" button that
>!<would use something like "MSRDC1.RollbackTransaction" or "MSRDC1.Cancel"
>!<but it doesn't work.
>!<P.S.: I'm querying an SQL Server 6 database via ODBC.
>!<Thanks.
Wherever you can use SQL statements, you can code BEGIN TRANSACTION [<name>],
COMMIT TRANSACTION [<name>] and ROLLBACK TRANSACTION [<name>]. As MS writes, in
case of nested transactions you may specify the name ONLY for the topmost one.
Example:
SQLS="BEGIN TRANSACTION xact_add INSERT INTO some table .....blah, blah, blah"
Connection.Execute SQLS
SQLS="COMMIT TRANSACTION xact_add"
Connection.Execute SQLS
This will work, as well as it will if you put BEGIN TRANSACTION and INSERT into
two different strings and execute those one by one.
Hope, this helps.
Thanks.
Michael.