Embedded SQL/C  program수행중 발생한  Error Message확인하는 방법입니다.

1. SQLCODE가 0 ~ 24999일때

     이message는 ASE로부터 발생됩니다.
     아래와 같이 sysmessages table에서 내용을 확인할 수 있으며
     자세한 내용은 Troubleshooting & error messages guide 2권을 참조합니다.
   
     select * from sysmessages where error = errorno
     
 예) select * from sysmessages where error = 2601


2. SQLCODE가   25000 ~ 25999일때
   
     이 message는  embedded SQL/C 로부터 발생됩니다.
     아래와 같은 file에서 확인 가능합니다.

      $SYBASE/OCS-12_5/include/sybtesql.h


3. SQLCODE > 26000일때
    이  message는 client library로부터 발생됩니다.

     Example:  error -16843171 라면
    우선,이 error번호를 hexadecimal값으로 변환합니다.  
     isql로 접속하여
     1> select inttohex(16843171)
     2> go

         --------
         010101A3

         (1 row affected)

     결과값인 0x010101A3 를 아래와 같이 분해하면,

     Layer = 01    
     Origin = 01
     Severity = 01
     Message # = A3                        

     A3을 다시 decimal로 변환하면 163이 됩니다.                        
1
크리에이티브 커먼즈 라이센스
Creative Commons License

  1.      Layer가  01, 03, 04 또는 05 이면  $SYBASE/locales/us_english/iso_1/ctlib.loc file에서
         Layer가  02  이면                      $SYBASE/locales/us_english/iso_1/cslib.loc file에서
         확인할수 있습니다.

        위예는  layer = 01이므로 $SYBASE/locales/us_english/iso_1/ctlib.loc file에서
         Message # 를 decimal값으로 변환한값인  163을 찾으면 됩니다.

        163 = 21000, "This routine cannot be called until all fetchable results have been completely processed."
    [Back]
이올린에 북마크하기
Posted by 소리나는연탄.

Leave your greetings here.