-
Errors collection not getting populated on SQL7 exception
I am executing a SQL 7 stored proc from within an MTS COM object written in
VB6. When the SP does raiserror (@errMsg,3,111), rs.ActiveConnection.Errors.Count
= 0.
If I execute the same SP from an ASP page, ...Count > 0.
Any thoughts?
Ed
-
Re: Errors collection not getting populated on SQL7 exception
I maybe wrong and the information I have dates back to vb3, but I believe
that in order for the SP error to filter back to VB, it must be between
levels 11-18, thus:
change raiserror (@errMsg,3,111) to raiserror (@errMsg,11,111)
--
Robert Gelb
"Ed" <edmacdonald@skydive.ca> wrote in message
news:38d17d90$1@news.devx.com...
>
> I am executing a SQL 7 stored proc from within an MTS COM object written
in
> VB6. When the SP does raiserror (@errMsg,3,111),
rs.ActiveConnection.Errors.Count
> = 0.
>
> If I execute the same SP from an ASP page, ...Count > 0.
>
> Any thoughts?
>
> Ed
-
Re: Errors collection not getting populated on SQL7 exception
Thanks,
I changed to 11 and now the error generates the On Error event within VB.
But with level 3, the Errors collection should still be populated for soft
errors and warnings, right? - as it does in VB script.
Ed
"Robert Gelb" <robertgelbNOSPAMFORME@zdnetonebox.com> wrote:
>I maybe wrong and the information I have dates back to vb3, but I believe
>that in order for the SP error to filter back to VB, it must be between
>levels 11-18, thus:
>
>change raiserror (@errMsg,3,111) to raiserror (@errMsg,11,111)
>
>--
>Robert Gelb
>
>"Ed" <edmacdonald@skydive.ca> wrote in message
>news:38d17d90$1@news.devx.com...
>>
>> I am executing a SQL 7 stored proc from within an MTS COM object written
>in
>> VB6. When the SP does raiserror (@errMsg,3,111),
>rs.ActiveConnection.Errors.Count
>> = 0.
>>
>> If I execute the same SP from an ASP page, ...Count > 0.
>>
>> Any thoughts?
>>
>> Ed
>
>
-
Re: Errors collection not getting populated on SQL7 exception
Got it, but I don't get it.
After setting up the ADO objects, if I use rs.Open I don't get any errors
on the connection object. If I use cmd.Execute, the errors show up.
Ed
"Ed" <edmacdonald@skydive.ca> wrote:
>
>Thanks,
>
>I changed to 11 and now the error generates the On Error event within VB.
> But with level 3, the Errors collection should still be populated for soft
>errors and warnings, right? - as it does in VB script.
>
>Ed
>
>
>"Robert Gelb" <robertgelbNOSPAMFORME@zdnetonebox.com> wrote:
>>I maybe wrong and the information I have dates back to vb3, but I believe
>>that in order for the SP error to filter back to VB, it must be between
>>levels 11-18, thus:
>>
>>change raiserror (@errMsg,3,111) to raiserror (@errMsg,11,111)
>>
>>--
>>Robert Gelb
>>
>>"Ed" <edmacdonald@skydive.ca> wrote in message
>>news:38d17d90$1@news.devx.com...
>>>
>>> I am executing a SQL 7 stored proc from within an MTS COM object written
>>in
>>> VB6. When the SP does raiserror (@errMsg,3,111),
>>rs.ActiveConnection.Errors.Count
>>> = 0.
>>>
>>> If I execute the same SP from an ASP page, ...Count > 0.
>>>
>>> Any thoughts?
>>>
>>> Ed
>>
>>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks