We have a PowerBuilder application we are trying to migrate from 11.5 to 2019 R2, and so far it was going great, until we were testing a module that calls a stored procedure and crashes at the CLOSE of the sproc with the message "Appeon PowerBuilder 2019 R2 has stopped working", and force quits the application (including PB if run with debug).
We've tried to pinpoint the issue by doing the following:
1. Replace the stored procedure being called with a dummy proc that does not do anything but still creating a result set. In this case, the application still crashes at the CLOSE of sproc. The content of the proc doesn't seem to matter here.
2. Replace the stored procedure being called with a dummy proc with no result set, comment out the "CLOSE" of that proc since stored proc with no result set does not require a CLOSE. In this case, the app crashes right after execution of the stored procedure.
3. Comment out the stored procedure call. We tried to see if commenting the stored procedure would allow the application to keep going without crashing. In this case, it'll go past the line where the app crashed previously, but upon coming to a point where another stored procedure is called, the app crashed on CLOSE of that subsequent stored procedure. This lead us to believe that there is a point where the app became unstable before the stored procedure was called, and crashes upon a call of a stored procedure.
4. Using autocommit = true before the proc is called, and comment out the COMMIT. Doing this made no changes in terms of preventing application crash, the application still crashed at the point where CLOSE of the stored procedure was called.
Does anyone have any clue on what causes the application crash? What this module does is basically save a transaction to a transaction table using update(), which works fine, then subsequently calls a stored procedure to save the transaction details to a transaction table detail after doing some calculations on a "save" event. Before the save is called, we have other modules calling and running other stored procedures without any issues repeatedly. We are using PowerBuilder 2019 R2 Build 2353. We are running out of ideas and approaching deadline rapidly. Any suggestions or advise will be greatly appreciated.
EDIT: Here are more details:
1. We are using Microsoft SQL Server 2014 (SP3-CU4) (KB4500181) - 12.0.6329.1 (X64)
2. We are using ODB ODBC, with ODBC Driver 11 for SQL Server
3. We are running the stored procs through PowerScript (inline SQL?) with the following syntax:
DECLARE sp_proc_name PROCEDURE FOR dbo.proc_name
@param1 = :param1,
@param2 = :param2;
<check SQL status code>