Rolling Back a Transaction with MySQL Connector in VB.net
- by Jonathan
Hey all-
I have one multi-row INSERT statement (300 or so sets of values) that I would like to commit to the MySQL database in an all-or-nothing fashion.
insert into table VALUES
(1, 2, 3),
(4, 5, 6),
(7, 8, 9);
In some cases, a set of values in the command will not meet the criteria of the table (duplicate key, for example). When that…