views:

17

answers:

1

Here (and not only there) people are using the following code to handle an error from sp_xml_preparedocument

EXEC @err = sp_xml_preparedocument @hdoc OUTPUT, @xmlDoc
SELECT @err = @@error + coalesce(@err, 4711)

Are there any reasons for this? And what does 4711 mean in this context?

A: 

4711 doesnt make any sense. I think its just a random number copy pasted from previous code. You can return any non-zero according to this -> Error handling

SELECT * FROM sys.messages WHERE language_id = 1033 and message_id = 4711
anivas