SV File_IO_Status Not Changing

CHo

VIP Member
Hi. I wrote a custom UBE which populates MCU field in custom table. Then I check SV File_IO_Status to see if the record has been updated or not. SV File_IO_Status is always SUCCESS even if the record has not been updated.

Here is my code:
F5538.update
IF SV File_IO_Status is equal to CO SUCCESS
RV Update Flag = Y
Else
RV Update Flag = N
End If

SV File_IO_Status never changes even if the record fail to update.

How do I go about checking to see if the record has been updated or not?
 
C,

Here is where a debug log would be handy. It would show the SQL update statement. As you are aware, if the update values already exist in the table row, the values will not change, but the SV File I/O will be SUCCESS. It may be an idea to do a fetch before and after the update and check the before and after values. These values and the SQL should provide you all the information you need to see what is happening.
 
Hi,
by default the update is always successful unless the update fails due to a unique key or insufficient rights. Even updating zero records is successful because no error occurred. To achieve what you want, you may check the checkbox during creating the update command (I think it is not possible anymore during edit). This will do additional fetch of the records being updated and then you will have the SV variable set as you probably expect. Another possibility is to do the fetch.
 
Hi C Ho,

The mappings in Update statement is missing in your inserted ER code - would be information to help you as well as the specification of your custom table (fields and indicies).

As far as I know, not all File IO statements set File_IO_Status flag :-(

Please, let us know more details about your scenario - and of course, consider Peter's suggestions too.

Regards,

Zoltán
 
Did you check if your UBE was created with the 'no update' option? That causes it to silently fail all database changes.
 
Back
Top