Delphi32.com - Home!
| Home/News | Downloads | Forums | D32 Magazine | Resources | Info and Facts |  
 
 Sybase / MSSQL ARITHABORT ON and Divide by zero occurred. error.


Why doesn't the Sybase SQL Link driver raise an error when a "Divide by zero" error occurs on the server?   

    The MSSQL and Sybase SQL Links drivers do not raise server errors with severity levels 0 and below for the reasons explained below.

    Setting ARITHABORT ON should change the severity level of arithmetic errors (see below).

    With MSSQL Server "ARITHABORT ON" appears to change the severity level of the "Divide by zero" error from 0 to 6 whereas Sybase does not change its level from 0 (as expected the underlying Sybase server behavior does change though).

    Both the MSSQL and Sybase documentation describe severity levels the same way (see below).

    MSSQL descriptions for levels 0 through 6:

    Severity Level 0 and 0: Status Information (Reported as Level 0) These messages are not errors; they provide additional information after certain statements have executed. [errors with levels 0 or 0 are not raised by the BDE]

    Severity Levels through 6 These messages indicate errors that can be corrected by the user. Sybase: -------------------------------------------

    set arithabort on select /0

    Server Message: Number 3607, Severity 0 Divide by zero occurred. (0 rows affected)

    ------------------------------------------- set arithabort off select /0

    Server Message: Number 362 , Severity 0 Command has been aborted. (0 rows affected)

    MSSQL: -------------------------------------------

    set arithabort off select /0 (null)

    ( row(s) affected)

    Divide by zero occurred.

    This error is documented as being Error: 3607 Severity Level: 0 Description: Divide by zero occurred.

    ------------------------------------------- set arithabort on select /0

    Msg 8 34, Level 6, State Divide by zero error encountered 7/ 3/99 0:54:39 AM

     



  << Previous Faq     Complete List     Next Faq >>  



 
 Hits/month  2,500,000+ 
 Downloads
 (Since May 2000)
 7,393,709 
 Total Files  6,023 
 Forum msgs  7,670 
 Articles/FAQs  70+/900+ 
Kylix
Tips n Tricks
FAQs
Knowledge Base
Bug Listings
Articles
Books
Newsgroups
Links
Submissions
Testimonials
Advertising
Contact Us
About Us
Search Amazon:
Top Selling Software at Amazon

| Home/News | Downloads | Forums | Resources | Info and Facts | Testimonials |
  Site Search:
 


Comments/Problems: Webmaster@delphi32.com
Copyright © 1998-2006, Delphi32.com. All rights reserved.
Terms of Use