Batch multiple select statements when calling Oracle from ADO.NET

后端 未结 4 1194
猫巷女王i
猫巷女王i 2020-12-10 12:05

I want to batch multiple select statements to reduce round trips to the database. The code looks something like the pseudo code below. It works perfectly on SQL Server, but

4条回答
  •  心在旅途
    2020-12-10 13:04

    You should write an anonymous pl/sql block that returns 3 ref cursors.

    edit1: Here it is done in an anonymous pl/sql block with one cursor. It should work with three too. Oracle ref cursors don't lock data and they are the fastest way to return a result set from a pl/sql procedure or an anonymous pl/sql bloc.

    http://www.oracle.com/technetwork/issue-archive/2006/06-jan/o16odpnet-087852.html

提交回复
热议问题