| From: | Barry Lind <blind(at)xythos(dot)com> |
|---|---|
| To: | Zengfa Gao <zfgao(at)yahoo(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: JDBC, PgSQL 7.2: transactions not supported!! |
| Date: | 2002-12-17 17:43:49 |
| Message-ID: | 3DFF6255.3080409@xythos.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Stark | 2002-12-17 18:46:42 | Re: ORDER BY random() LIMIT 1 slowness |
| Previous Message | Zengfa Gao | 2002-12-17 17:10:14 | JDBC, PgSQL 7.2: transactions not supported!! |