"sdfgsd" <sd**@sdg.com> wrote in message news:<nR********************@twister.tampabay.rr.c om>...
I'm trying to port the use of postgresql db to mysql. I'm using
Java and having the following problem - I can't seem to write more
than 1 query per execution. Easier to explain with an example that
worked under postgresql and does not using mysql:
aStatement.executeQuery("BEGIN; DELETE FROM table1; DELETE FROM
table1; DELETE FROM table3; COMMIT;");
If I separate this into 5 different queries it works fine... Any
ideas?? Thanks,
You may want to go to www.mysql.com and read up on the different table types
in the version of mysql you are using. It is probable that your version and
table type will not allow you to group your statements as a transaction.
Hi, I've read the mySQL docs regarding table types and it is still
unclear to me if the problem I'm having is to do with table types (and
you were right I use the default table type which does not support
transactions) or with jdbc. As you can see my query, I'm performing
operations on 3 different tables and not on the same one. Therefore
my question is more along on the lines: is there a setting in mySQL
that allows multiple queries at a time? The error I'm getting
indicates an SQL error after the first ";". Thanks.