ANSI WARNINGS and error object

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

  1. simon

    simon Guest


    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, Sep 22, 2010
    1. Advertisements

  2. simon

    Bob Barrows Guest

    Nothing beyond parsing them to see if they are warnings and if so,
    ignore them.
    Bob Barrows, Sep 22, 2010
    1. Advertisements

  3. simon

    simon Guest

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

    simon, Sep 23, 2010
  4. simon

    Bob Barrows Guest

    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:

    Look in SQL Books OnLine (BOL) to see the error codes and their
    Bob Barrows, Sep 23, 2010
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.