From: | Joel Bernstein <joel(at)basefive(dot)com> |
---|---|
To: | mg <marcel(dot)gsteiger(at)milprog(dot)ch> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Why does the JDBC driver not support prepareCall? |
Date: | 2001-01-19 15:49:44 |
Message-ID: | 3A686218.84CC0365@basefive.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-jdbc |
I have not tried prepareCall with postgreSQL but it makes sense
that it would not be implemented.
prepareCall is a JDBC method used to call stored procedures in a database.
postgreSQL implements stored procedures as function calls.
So up to now the prepareCall method has not been needed because to call
a function you just would use a Statement or PreparedStatement like this:
-----------------------------------
PreparedStatement pstmt = null;
/*
* deleteUser() is the function call.
*/
String sql = "select deleteUser()";
try
{
pstmt = con.prepareStatment(sql);
pstmt.executeQuery();
}
catch(Exception e)
{
}
finally
{
}
---------------------------------------
I have heard talk of an EXECUTE commad that was added for function
calls but I'm not sure is works like the EXEC for stored procedures
does in MS SQLserver and other databases. If it does then prepareCall
could be used.
Anybody have comments on EXECUTE.
Joel
From | Date | Subject | |
---|---|---|---|
Next Message | Colin Taylor | 2001-01-19 15:53:29 | RE: Questions about Synonyms - Again |
Previous Message | Nathan Heagy | 2001-01-19 15:46:50 | Selects with Array member |
From | Date | Subject | |
---|---|---|---|
Next Message | Cedar Cox | 2001-01-21 10:47:09 | ODBC gives pq_recvbuf: unexpected EOF on client connection |
Previous Message | Steve Sullivan | 2001-01-19 14:44:29 | pq_recvbuf: unexpected EOF on client connection |