Hello,
I’m currently writing a small RESTXQ application that receives POSTed XML and then stores it into the database.
It works well but I want to make it more robust so I’m adding more error handling code.
One scenario I want to cover is where the database to be written to exists but is open in another process for some reason.
In my function I do something like this:
try { db:replace(“DATABASE_NAME”,”PATH/TO/FILE”,<Element/>) } catch * { db:output(<insert code here>) }
I expect that this code should complete without error - knowing of course that the database won’t be updated.
Instead I always get a bxerr:BXDB0007 error thrown and I can’t find any way to catch it. (It’s also not listed as a possible error in the documentation, although is against db:create)
Is this something subtle to do with the pending updates list?
I’m sure I’m missing something obvious but I can’t see it.
Thank you for any help and direction,
James