ANSI WARNINGS and error object

Discussion in 'ASP General' started by simon, Sep 22, 2010.

  1. simon

    simon Guest

    Hi,

    I'm using err.number to check if there is some error when executing
    stored procedures on sql database.
    But if sql returns ANSI WARNINGS, that is always error to asp, err
    object is not empty.
    I can't set ansi warnings to off on sql server because I have indexed
    views, filtered indexes,....

    I must check this on asp side - any idea?

    Thank you,
    Simon
     
    simon, Sep 22, 2010
    #1
    1. Advertising

  2. simon

    Bob Barrows Guest

    simon wrote:
    > Hi,
    >
    > I'm using err.number to check if there is some error when executing
    > stored procedures on sql database.
    > But if sql returns ANSI WARNINGS, that is always error to asp, err
    > object is not empty.
    > I can't set ansi warnings to off on sql server because I have indexed
    > views, filtered indexes,....
    >
    > I must check this on asp side - any idea?
    >

    Nothing beyond parsing them to see if they are warnings and if so,
    ignore them.

    --
    HTH,
    Bob Barrows
     
    Bob Barrows, Sep 22, 2010
    #2
    1. Advertising

  3. simon

    simon Guest

    On 22 sep., 21:09, "Bob Barrows" <> wrote:
    > simon wrote:
    > > Hi,

    >
    > > I'm using err.number to check if there is some error when executing
    > > stored procedures on sql database.
    > > But if sql returns ANSI WARNINGS, that is always error to asp, err
    > > object is not empty.
    > > I can't set ansi warnings to off on sql server because I have indexed
    > > views, filtered indexes,....

    >
    > > I must check this on asp side - any idea?

    >
    > Nothing beyond parsing them to see if they are warnings and if so,
    > ignore them.
    >
    > --
    > HTH,
    > Bob Barrows


    Thank you.
    Do you know maybe if err.number is some specific for ansi warnings?

    br,Simon
     
    simon, Sep 23, 2010
    #3
  4. simon

    Bob Barrows Guest

    simon wrote:
    > On 22 sep., 21:09, "Bob Barrows" <> wrote:
    >> simon wrote:
    >>> Hi,

    >>
    >>> I'm using err.number to check if there is some error when executing
    >>> stored procedures on sql database.
    >>> But if sql returns ANSI WARNINGS, that is always error to asp, err
    >>> object is not empty.
    >>> I can't set ansi warnings to off on sql server because I have
    >>> indexed views, filtered indexes,....

    >>
    >>> I must check this on asp side - any idea?

    >>
    >> Nothing beyond parsing them to see if they are warnings and if so,
    >> ignore them.
    >>
    >> --
    >> HTH,
    >> Bob Barrows

    >
    > Thank you.
    > Do you know maybe if err.number is some specific for ansi warnings?
    >

    Yes, it very likely is, especially if the NativeError property of the
    connection's Error object is set by the error. Unfortunately, this is
    not always provided. See:
    http://www.sommarskog.se/error-handling-I.html#clientside

    Look in SQL Books OnLine (BOL) to see the error codes and their
    meanings.

    --
    HTH,
    Bob Barrows
     
    Bob Barrows, Sep 23, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sunil Menon
    Replies:
    3
    Views:
    4,081
    Victor Bazarov
    Dec 3, 2003
  2. Replies:
    1
    Views:
    519
  3. Replies:
    11
    Views:
    1,122
    Keith Thompson
    Apr 28, 2008
  4. Frank Iannarilli

    pre-ansi to ansi c++ conversion?

    Frank Iannarilli, Jul 21, 2009, in forum: C++
    Replies:
    2
    Views:
    442
  5. Ted Sung
    Replies:
    1
    Views:
    345
    Sherm Pendley
    Aug 30, 2004
Loading...

Share This Page