Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.


I have an insert inside a try block and when I try to set a NOT NULL Column to NULL I end up in the catch but

SELECT SQLCODE, ERRORMSG() INTO v_sqlcode, v_errormsg

end up with

v_sqlcode= 0 v_errormsg = NULL

Is this a correct behaviour or should it work?

asked 17 Feb '15, 06:58

M%20G's gravatar image

accept rate: 42%

Is the SELECT statement the first statement executed in the error handler?

Try using ERROR_SQLCODE and ERROR_MESSAGE builtin functions - those should report the error information anywhere in the handler, not just in the first statement.

permanent link

answered 17 Feb '15, 11:15

Elmi%20Eflov's gravatar image

Elmi Eflov
accept rate: 36%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 17 Feb '15, 06:58

question was seen: 1,959 times

last updated: 17 Feb '15, 11:15