75
Views
2
Comments
[VPJJWI007].dbo.[OSUSR_47S_QUOTE] with key 0 was not updated

When i opening my screen its shows like this ..How to solve this issue please help !!!

2021-06-09 13-39-18
Agno Silveira
 
MVP

Hello Prabinraj,

Possibly when starting your screen there is an update of a record without passing its ID.

Could you share your .oml for analysis?

Regards.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Prabinraj,

First, it's important to know how to read this message. The first part ("[VPJJWI007].dbo.[OSUSR_47S_QUOTE] ") is the database table name. "VPJJWI007" is the database name (not importent), "dbo" the schema (also not importent), "OSUSR_47S_QUOTE" is the table name.

Tables are the database equivalent of OutSystems entities. Entities you create in OutSystems will always have a table name in the database starting with "OSUSR" (for "OutSystems USeR table"), followed by a three-character module hash (needed because the same entity name can be used in different modules), followed by the entity name (if you haven't renamed it, otherwise it's the original name before any renaming). So in your case, were likely looking at the Quote entity.

The second part contains the actual error message "with key 0 was not updated". This means that you tried to update a record in the entity with a "key", that is, an identifier, with value 0. Since 0 is not a valid value for an entity with an autonumber identifier, no record will have this value, so the database can't find it, and reports an error.

Now, as for the cause, that's something for you to find out. For starters, I find it highly suspect that this happens when opening the screen. If you have a Traditional Web application, this means in the Preperation of the screen there's an attempt to update the Quote entity - but why would you do this in the preperation? If you have a Reactive application, the update might happen in an OnXxx action or a data fetch action, also very unexpected. So this is definitely something to check!

That said, if you are really sure there's a Quote record that should be updated when starting the screen, check the screen's logic to see where it happens, and why the identifier isn't set to a valid value. Does the screen have an input parameter of type Quote identifier, and there's no input passed? In which case it would be better to check that and give a sensible error message instead of the current one.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.