You could look what returns sqlca.sqlerrtext
(providing that the current object transaction is the default sqlca
, you may need to adapt that) just after the -1
return by retrieve()
it should help.
You could also put a breakpoint into the DW dberror()
event to look if there is something useful here in case of error.