From: | Peter T Mount <peter(at)retep(dot)org(dot)uk> |
---|---|
To: | Wayne Johnson <wdtj(at)yahoo(dot)com> |
Cc: | pgsql-interfaces(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Postgresql and JDBC |
Date: | 2001-01-30 09:11:39 |
Message-ID: | 980845899.3a76854b0de35@webmail.retep.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces pgsql-jdbc |
Quoting Wayne Johnson <wdtj(at)yahoo(dot)com>:
> I've got some questions on using POSTGRESQL with JDBC. Some folks on
> the
> Novice mailing list suggested I use the interfaces mailing list, but
> the
> web site suggests that I should use another. Which mailing list is
> appropriate.
pgsql-jdbc(at)postgresql(dot)org - its a new list created due to the ammount of
traffic.
I've got to update the jdbc pages this week.
> I would like to do a read & update of a single record. I've seen
> several
> examples of using JDBC to update an entire table, but I'm only looking
> to
> modify a single record.
Standard SQL, ie UPDATE table SET col=value WHERE keycol=keyvalue;
Then use executeUpdate() from within Statement.
The basic example in the source included this.
>
> Is this a case where I should use getCursorName? How do I then do an
> UPDATE to only modify that single record? Is this multi user safe?
No, cursors are mainly used to manage large result sets.
> I've
> tried the JDBC 2.0 updateXXX functions, but they are apparently not
> implemented for Postgresql yet.
No. UpdateableResultSet is not yet available (partly done), and you can't
guarantee it working on all ResultSet's anyhow (see the JDBC2.0 specs).
>
> Are there any good (in depth) examples of JDBC out there? The only
> ones
> I've seen are limited to a simple SELECT or UPDATE.
The source has some (src/interfaces/jdbc/example)
Peter
--
Peter Mount peter(at)retep(dot)org(dot)uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/
From | Date | Subject | |
---|---|---|---|
Next Message | Jean-Francois Burdet | 2001-01-30 09:37:06 | Re: Re: [INTERFACES] jdbc: v7.1 bug (letter accent) |
Previous Message | Peter T Mount | 2001-01-30 09:04:48 | Re: [INTERFACES] jdbc: v7.1 bug (letter accent) |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter T Mount | 2001-01-30 09:23:50 | Re: Re: Patch for jdbc Makefile |
Previous Message | Peter T Mount | 2001-01-30 09:04:48 | Re: [INTERFACES] jdbc: v7.1 bug (letter accent) |