getting message description using message error code..

getting message description using message error code..

Post by Amit Sawhn » Mon, 13 May 2002 15:37:34



How can i receive message description with the message error code...
like in my stored proc...the code is as follows

   begin    
    rollback tran    
    raiserror 20004,'JOURNAL' /* unable to insert into JOURNAL */    
    return 20004
   end    
 end

20004 error is defined in table sysusermessages as

20004           Unable to insert into '%1!'

i m connecting my C client with syb using ctlib.I m getting the proper
error code(in this case 20004) but not able to get the description of
the message to be displayed to the user...
plz help...

Thankx in advance
Amit

 
 
 

getting message description using message error code..

Post by Abe Crabtr » Wed, 22 May 2002 21:50:17


You should be able to access the message text in

srvmsg->text

within your message handler, same as any message.

I'm not sure if this answers your question - let me know if not,

Regards,

Abe Crabtree