PowerBuilder 2017
SQL Server 2019
We have a few customers who every now and then get an error message from our code, and when they run the same thing again it works just fine.
The code is looping rounnd a lot and checking to see if some matching data can be found in the database. This happens in each loop iteration:
lds_ds.DataObject = 'd_get_common_transfer_bank_details'
lds_ds.SetTransObject(SQLCA)
ll_count = lds_ds.retrieve( ll_client_ref, as_data[ 3 ], ll_property_ref, as_data[ 4 ])
Every now and then ll_count is retuned as -1 which from the help seems to indicate the SQL failed, or the datastore dataobject was invalid. However the same bit of code has just worked multiple times before except with different arguments, and when I look at the arguements for the failed code they look reasonable.
So my question is is this true: -1 is ONLY returned if there is some error, otherwise 0 would indicates no data found and a positive number, some data found?
Any ideas why a -1 would suddenly appear? Is this a known issue in PB 2017, and would making the user upgrading to PB 2019 R3 (our current version) be of any help. They are reluctant to upgrade at the moment for various reasons.
Thank you!