dbTalk Databases Forums  

Sybase Error Message catching

comp.databases.sybase comp.databases.sybase


Discuss Sybase Error Message catching in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
diasroshan@gmail.com
 
Posts: n/a

Default Sybase Error Message catching - 07-19-2012 , 05:00 AM






In my Sybase PL/SQL block i can get the error code using @@ERROR.
But is there a way to get the error message.

I am looking for an equivalent to Oracle's SQLERRM

Quering sysmessages is not helping.

For Eg.
When i insert NULL in a NOT NULL column i need to catch and display the below error message which i would normally get if i execute the block in ASE ISQL.

'The column ABCD in table XYZ does not allow null values.'

Help appreciated.

Cheers,
Rosh

Reply With Quote
  #2  
Old   
bret@sybase.com
 
Posts: n/a

Default Re: Sybase Error Message catching - 07-19-2012 , 05:30 PM






On Thursday, July 19, 2012 4:00:08 AM UTC-6, (unknown) wrote:
Quote:
In my Sybase PL/SQL block i can get the error code using @@ERROR.
But is there a way to get the error message.

I am looking for an equivalent to Oracle's SQLERRM

Quering sysmessages is not helping.

For Eg.
When i insert NULL in a NOT NULL column i need to catch and display the below error message which i would normally get if i execute the block in ASEISQL.

'The column ABCD in table XYZ does not allow null values.'

Help appreciated.

Cheers,
Rosh
No. The error message text is sent to the client, but there is currently no way to access the full message from SQL. There is an open feature request, CR 296395, for a new global string variable that would contain the full text of the most recently raised error (the message template from sysmessages with values filled in).

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.