1

この SQL コードを実行する必要があります。

exec procedure(param, param, param, param)

select * from bla_bla_table;

commit;

そして、このクエリから ResultList を取得します。

私はこのようにそれをやろうとしました:

CallableStatement stmt = connection.prepareCall("{call procedure(param,param,param,param)}");
stmt.execute();

ResultSet を取得するselect * from bla_bla_table;前に、SQL ステートメントをここに挿入するにはどうすればよいですか。commit私はそれを行うために多くの方法を試しました...しかし、何も役に立ちません。

4

2 に答える 2

4

これを試しましたか?

connection.setAutoCommit(false); // Disable Auto Commit
CallableStatement stmt = connection.prepareCall("{call procedure(param,param,param,param)}");
stmt.execute();

Statement stmt2 = connection.createStatement();
ResultSet rs = stmt2.executeQuery("select * from bla_bla_table"); // Result set for Query

connection.commit();
于 2013-05-21T12:19:48.913 に答える