1. Luiz Marques
  2. PowerBuilder
  3. Tuesday, 27 October 2020 23:17 PM UTC

Hello,

        Recently I have migrated a very old Powerbuilder application to the version 2019 R2. I have tested some windows and inserts, updates and deletes and I noticed that a lot of procedures datawindows was not returning any rows in the retreive. I have opened all the dw source, saved and regenerated and after that the dw got the results. The oringinal version 7 the application is showing correctly the records (maybe the DWs got corrupted during the migration?). Once this solved now I'm getting the error "Row changed between retrieve and update" in most of the screens that the version 7 is saving correctly. There is 2 main differences in the environmets, in the client they use MSS DBMS, SQL server 2008 with the compatibility mode SQL server 2000 (80). I know tha is a very very old DB, the version 7 is very old but I'm trying to sort this out, at least the migration. I have created the exactly same environmet in my company to run the migration and the DW errors started to popup in most of the screens , as an example below:

Database error code: -3

Database error message:
Row changed between retrieve and update.

No changes made to database.

UPDATE xxxxx SET lgh_comment = 'aaaaaa' WHERE lgh_number = 1111111

The only diffeence at this point is the DBMS, I'm using SNC instead of MSS (used in the Pb 7). I have installed the client and I'm using the following DBParm:

 

dbparm=Staticbind=0,Database='TMW_DC',Provider='SQLNCLI11',TrimSpaces=1,PBTRIMCHARCOLUMNS='YES',RecheckRows=1

 

I have tried a lot of different combinations without success, I have tried to set the trigger SET NOCOUNT ON and didn't work as well. I really don't know what to do anymore. Someone faced this same issue in here ? Can someone give me some help? I really don't know what to do anymore........

 

PS: The application had no changes at all, only migrated and the DMBS updated to SNC as the PB 2019 do not accept the MSS anymore.

 

I noticed as well if I disable the trigger in the table behind the dataobject I'm able to save the record with success. There is any dbparm that I can use to manage this? Why using the DBMS MSS with the very same trigger I don't get this error?

John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 28 October 2020 04:26 AM UTC
  2. PowerBuilder
  3. # 1

Hi, Luiz - 

I suggest you try to reduce the scope of what you are trying to diagnose... take small steps. Change only one thing at a time.

What kind(s) of trigger(s) are present? Insert? Update? Delete? What does it/they do? What column(s) are changed between retrieve and update? Is it one table? Several? Most? All? Are the update properties of the DataWindow(s) set to use DELETE, then INSERT or use UPDATE statements?

Set aside diagnosing the application for the time being. Are you able to manually retrieve/modify/update data in same table(s) via the Database Painter (NOT the DataWindow Painter, at this point) in the PB IDE (that is, try a similar data update without using the application and without using MS SQL Server Management Studio (SSMS)?

I assume you're testing using a development copy (backup/restore) of a production database. Have you tried upgrading the compatibility mode of the database to say, 2008?

Once you can verify that you are able to manipulate table data via the PB Database Painter, then try to do the same with a small number of the application's DataWindows via the DataWindow Painter, particularly one or two that you know fails in the application.

Once that seems to be working, if the app continues to have problems, run with the DB driver trace enabled (SQLCA.DBMS = 'TRACE SNC' instead of SQLCA.DBMS = 'SNC') to see what the app is sending and receiving.

Of course, continue to ask questions when needed. Good luck!

Regards, John

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.