Subject IBO Stored procedure under high load
Author dirknaudts
Hi,

I'm using IBO on an Asta3 Server, and when doing performance testing
tonight, I came accross the following problem : An AstaClient
application
executes an Asta Servermethod, which , within it's own thread has to
execute an IBO stored procedure. The Asta Servermethod has the same
parameters as the IBO SP, so in the Action procedure of the method I
do the
following :

procedure TIBDataModule.AstaBusinessObjectManager1Actions0Action(
Sender: TObject; ADataSet: TDataSet; ClientParams: TAstaParamList);
var
i:Integer;
begin
lastBOActionDate := now;
ibSPPROCESSDAYBID.prepare;
for i:=0 to ClientParams.Count-1 do
begin
if ibSPPROCESSDAYBID.Parambyname(ClientParams[i].Name) <> nil
then <-
Error happened here
begin
ibSPPROCESSDAYBID.ParamByName(ClientParams[i].Name).value :=
ClientParams[i].value;
end;
end;
ibSPPROCESSDAYBID.execproc;
..

normally this runs fine, but occasionally (when I try to put pressure
on the
server) I receive an error saying ibSPPROCESSDAYBID parameter BuyID
doesn't
exist, although it does exist and has been executing for
about a 1000 times <g>

I changed the parambyname in the marked line to findparam, but now I'm
getting an occasional List index out of bounds error sometimes on
listindex
1, sometimes on 2 or 3

How can it be that suddenly the params get lost ?

Is the prepare ok , or should I call unprepare before that ? Why only
failing every x times or so ?

Thanks,
Dirk Naudts.