Re: JDBC, PgSQL 7.2: transactions not supported!!

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Re: JDBC, PgSQL 7.2: transactions not supported!!
Дата
Msg-id 3DFF6255.3080409@xythos.com
обсуждение исходный текст
Ответ на JDBC, PgSQL 7.2: transactions not supported!!  (Zengfa Gao <zfgao@yahoo.com>)
Список pgsql-general
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:
> 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?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>



В списке pgsql-general по дате отправления:

Предыдущее
От: Zengfa Gao
Дата:
Сообщение: JDBC, PgSQL 7.2: transactions not supported!!
Следующее
От: Greg Stark
Дата:
Сообщение: Re: ORDER BY random() LIMIT 1 slowness