Hello
I work with the ODCIIndex database interface
Operation mode batch insert
Batch size is very small = 200 (or 55) records
My decisions
I accumulate data in a package variable and load
via JOB (could not determine the end of the operation)
What are the system solutions
How to determine the last package or last entry
I will attach the full code at your request.
Thanks
----------------------------------------------------------------------
Example
create or replace package Sv_Package as
function ReadItem(sItem in Sv_Indexlending) return Sv_Indexlending;
function SaveItem(sItem in Sv_Indexlending) return Sv_Indexlending;
end Sv_Package;
/
create or replace package body Sv_Package as
Item Sv_Indexlending;
function ReadItem(sItem in Sv_Indexlending) return Sv_Indexlending
is
begin
if Item is Null then Item:=Sv_Indexlending(0,Null); end if;
return Item;
end;
function SaveItem(sItem in .Sv_Indexlending) return Sv_Indexlending
is
begin
Item:=sItem;
return Item;
end;
end Sv_Package;
static function OdciIndexInsert (iA Sys.ODCIIndexInfo,RidList Sys.ODCIRidList,NewValList Sv_DateList, Env Sys.ODCIEnv) Return Number
is
begin
declare
I Integer;
S Boolean:=False;
L Sv_IndexLending;
begin
L:=Sv_Package.ReadItem(Null);
--Sv_WorkedJob('Create',L.ListRecord);
Sv_WorkedJob('Disable',Null);
for I in NewValList.First .. NewValList.Last loop
if Not NewValList(I) is Null then L.AddRecord(To_Char(NewValList(I),'DD-MM-YYYY')||RowIdToChar(RidList(I))); end if;
end loop;
L:=Sv_Package.SaveItem(L);
Sv_WorkedJob('Enable',L.ListRecord);
return ODCIConst.Success;
end;
end;