JDBC, PgSQL 7.2: transactions not supported!!
Hi,
I am using JDBC Driver to access PgSQL 7.2. When I
add:
Statement.executeQuery("BEGIN WORK;");
...
Statement.executeQuery("Insert.........");
...
Statement.executeQuery("COMMIT WORK;");
in the java code.
I got:
transactions not supported!!
According the document of 7.2, transaction is
supported. Does anyone know what's wrong here?
Thanks!
Zengfa
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
Zengfa,
Transactions are supported, you are just doing them incorrectly for
jdbc. In jdbc you turn on transactions by calling
connection.setAutoCommit(false);
and you commit or rollback by calling connection.commit(); or
connection.rollback();
--Barry
Zengfa Gao wrote:
Show quoted text
Hi,
I am using JDBC Driver to access PgSQL 7.2. When I
add:Statement.executeQuery("BEGIN WORK;");
...
Statement.executeQuery("Insert.........");
...Statement.executeQuery("COMMIT WORK;");
in the java code.
I got:
transactions not supported!!According the document of 7.2, transaction is
supported. Does anyone know what's wrong here?Thanks!
Zengfa
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?