Question

Trouble to fill the data on a custom page

  • 2 August 2023
  • 8 replies
  • 59 views

Userlevel 2
Badge +9

Hello.

I have an issue that I can find no solution.

On a custom page I made, I added a custom menu to fill the data.

The thing is, when I run the code behind, the table remains empty, when I run the exact same code on sql developer, the table is correctly filled with data.

Initially, I suspected a trouble related to parameters, I made then a new procedure with no parameter, I continue to have the exact same trouble.

Code I put :

begin
  ifsapp.MyCustomPackage_api.SFDChargerContratW0071;
  commit;
end;

 

Right before, I had this code :
begin
  ifsapp.MyCustomPackage_api.SFD_CP_PR_Contrat('O', 'W0071');
  commit;
end;

 

Inside the SFDChargerContratW0071 procedure, I put this :

PROCEDURE ChargerContratW0071
IS
BEGIN
    SFD_CP_PR_Contrat('O', 'W0071');
END ChargerContratW0071;

 

Is there something that I’m missing? 

Thanks


8 replies

Userlevel 5
Badge +9

Hi @romsar ,

Could you please share a screen shot of your custom menu?

Userlevel 2
Badge +9

 

 

not sure to know what you can see.

As the code works diffently in between IFS and SQL Developer, I can imagine there is an issue related to the rights to read a datatable, but IFS shows no error...

Userlevel 2
Badge +9

Now I’m thinking : the treatment itself is rather long, it can take some minutes to run on SQL Developer.

Is there an executation time limitation on IFS, which might explain the issue? When I run the treatment on IFS, I see the treatment doesn’t take so much time to be “executed”, like about 20 seconds

Userlevel 2
Badge +9

Hello, can someone help me?

Userlevel 3
Badge +8

If execution time is an issue, I would run this as a scheduled task in IFS.

Userlevel 2
Badge +9

you mean there is no solution within IFS? like, there is no way to modify the time-out?

Userlevel 3
Badge +8

Regarding the timeout, theres no way I’m aware of.  If i’ve needed to get data from one area to another (for example copying fields being between inter-site orders), I’ve written an API to fill in the data and scheduled this to run at regular intervals.

 

If the SQL procedure is taking several minutes though, it might be a better idea to see if you can improve it’s performance.

 

Userlevel 2
Badge +9

Hello @Hypervox 

I got a feedback from the IFS support, thanks to them, I could review my whole LU, now, it’s taking me 2 minutes to load 80 lines, yesterday, it did last almost 20 minutes. I simply update the sql querry within 2 CF, nothing else.

Moreover, I did modify the code which runs within the custom menu, in which I make a difference in between a manual action and the action via a planified task. The manual action lasts about 5 seconds as I just skipped a part of the main code, which is now executed via a plenified task.

This way, my page would run fine, but only the planified task can load new lines, and it’s running at 11PM. For me, this is a temporary solution, until I would get something more appropriated.

Reply