Does PG's JDBC support prepared statements at all?
| От | Dr. Evil |
|---|---|
| Тема | Does PG's JDBC support prepared statements at all? |
| Дата | |
| Msg-id | 20011020231422.7227.qmail@sidereal.kz обсуждение исходный текст |
| Ответы |
Re: Does PG's JDBC support prepared statements at all?
Re: Does PG's JDBC support prepared statements at all? Re: Does PG's JDBC support prepared statements at all? |
| Список | pgsql-jdbc |
There is a bunch of documentation for prepared statements in PG's
JDBC, it seems that the only thing prepared statements do is throw
exceptions.
Here's some code I'm trying:
String newvalue = "This is a new value";
int accountnumber = 54;
String qstring = "UPDATE foo SET message = '?' WHERE number = ?";
PreparedStatement st = db.prepareStatement(qstring);
st.setString(1, newvalue);
st.setInt(2, accountnumber);
st.execute();
st.clearParameters();
st.close();
and I always get a Parameter index out of range error, which seems
impossible. Any idea what's going on?
В списке pgsql-jdbc по дате отправления: