Uisng Procedures via JDBC

Поиск
Список
Период
Сортировка
Искать

Uisng Procedures via JDBC

От:
"Michaell Oxtoby" <michael.oxtoby@viewgate.com>
Дата:
I have a query about accessing stored procedures in Postgres via JDBC.

Currently if we have a "cardata" procedure which retrieves a set of data on
cars

we access it in the following manner:

Statement s1 = connection.createStatement( );

String query = "select cardata( )";

ResultSet results = s1.executeQuery( query );

This is very different from the standard way of calling a stored procedure
in JDBC which

looks more like:

CallableStatement s1 = connection.prepareCall("{ call cardata }");

ResultSet results = s1.executeQuery( );

I would like to know if there is a better way of calling stored procedures
than the one we

are using or whether there is a method that looks more like the second piece
of code.




Re: Uisng Procedures via JDBC

От:
"Josh Berkus" <josh@agliodbs.com>
Дата:
Michaell,

Send your question to the pgsql-jdbc list.  They can help you.  We can't.

-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________                                      Josh Berkus Complete information technology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small businesses        fax 621-2533   and non-profit organizations.      San Francisco

FAQ