Hello Appeon Team,
We have PB application running in background as service which process some files. We are facing one issue where we have written one function in NVO object and doing below.
Create local datastore using n_ds
setting dataobject
setting Transobject using SQLCA
Retrieve the local datastore.
Now the problem is since this function being called for each line item for the files. We are seeing the service getting stall after processing few lines. we put some log to see where it is getting stall and it is on Retrieve. Once observation we found that the datasource SQL query contains a semicolon (;). I am not sure if semicolon is causing this problem and if it does then it should at first line itself but few lines are being processed successfully.
FYI - since this is local datastore, we are not explicitly calling Destroy method to destroy the local object.
Here is the code snippet
n_ds lds_options_on_order
lds_options_on_order = Create n_ds
lds_options_on_order.dataobject = 'd_options_on_order'
lds_options_on_order.of_Settransobject( SQLCA)
f_Log(Before call Retrieve)
lds_options_on_order.retrieve(il_Stock_No) // process hangs up on this line.
f_Log(After call Retrieve) // This log appears for few line items....
I need help to understand if semicolon in Select Query in datasource is causing this issue as I don't see why it will fail to retrieve in between.
Please help. We have a critical issue.
SELECT "TableA"."stock_no",
"TableA"."code",
"TableA"."type"
FROM ("TableA" LEFT OUTER JOIN "TableB" ON "TableA"."code" = "TableB"."code" AND "TableA"."type" = "TableB"."type" AND "TableA"."make" = "TableB"."make")
WHERE ("TableA"."stock_no" = :al_no) AND
("TableA"."type" = 'O');
Here :al_No is the retrieval argument
Note - There is a semicolon in the query. We are going to remove the semicolon from the query and going to test if this works.
One thing to remember that since we are running this process in the background, this will not have any user interaction so if by any chance Retrieve() will open Retrieval argument then also process will stall though we are passing the retrieval argument.
There is nothing extra in this code.