| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Database Toolbox |
| Contents | Index |
| Learn more about Database Toolbox |
rollback(conn)
rollback(conn) reverses changes made to a database using fastinsert, insert, or update via the database connection conn. The rollback function reverses all changes made since the last commit or rollback operation. To use rollback, the AutoCommit flag for conn must be off.
Note The rollback function does not roll back data in MySQL databases. |
Ensure that the AutoCommit flag for connection conn is off by running:
get(conn,'AutoCommit') ans = off
Insert data contained in exdata into the columns DEPTNO, DNAME, and LOC, in the table DEPT, for the data source conn.
fastinsert(conn, 'DEPT', ...
{'DEPTNO';'DNAME';'LOC'}, exdata)
Roll back the data that you inserted into the database by running:
rollback(conn)
The data in exdata is removed from the database. The database now contains the data it had before you ran the fastinsert function.
commit, database, exec, fastinsert, get, insert, update
![]() | resultset | rows | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |