Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   ANSI WARNINGS and error object (http://www.velocityreviews.com/forums/t805141-ansi-warnings-and-error-object.html)

simon 09-22-2010 03:29 PM

ANSI WARNINGS and error object
 
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

Bob Barrows 09-22-2010 07:09 PM

Re: ANSI WARNINGS and error object
 
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



simon 09-23-2010 08:09 AM

Re: ANSI WARNINGS and error object
 
On 22 sep., 21:09, "Bob Barrows" <reb01...@NOyahoo.SPAMcom> 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

Bob Barrows 09-23-2010 01:15 PM

Re: ANSI WARNINGS and error object
 
simon wrote:
> On 22 sep., 21:09, "Bob Barrows" <reb01...@NOyahoo.SPAMcom> 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-handl...tml#clientside

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

--
HTH,
Bob Barrows




All times are GMT. The time now is 06:58 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57