Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Calling a Visual Basic Component Subroutine from ASP

Reply
Thread Tools

Calling a Visual Basic Component Subroutine from ASP

 
 
Michael Farber
Guest
Posts: n/a
 
      07-17-2003
Not sure if this is the right group for this but anyways...

I've got an ASP web application that uses a Visual Basic component to do
some work. I instantiate the component in asp and then attempt to call the
subroutine. The subroutine is actually invoked maybe 2 out of 10 times run.
What could possibly be the reason for this?? Why the inconsistency in
running the subroutine?

Cheers


 
Reply With Quote
 
 
 
 
Chris Barber
Guest
Posts: n/a
 
      07-18-2003
Do you have On Error Resume Next in the ASP?
Is the VB routine throwing an error.
Is the VB DLL compiled as 'Apartment Threaded' and 'Unattended Execution'?

How do you know that the routine is not being called? Have you run the DLL
in debug mode?

Chris.

"Michael Farber" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Not sure if this is the right group for this but anyways...
>
> I've got an ASP web application that uses a Visual Basic component to do
> some work. I instantiate the component in asp and then attempt to call

the
> subroutine. The subroutine is actually invoked maybe 2 out of 10 times

run.
> What could possibly be the reason for this?? Why the inconsistency in
> running the subroutine?
>
> Cheers
>
>



 
Reply With Quote
 
 
 
 
Michael Farber
Guest
Posts: n/a
 
      07-18-2003
Hi, thanks for the reply.

1. ASP does have On Error Resume Next. I have disabled this to see what
happens. Nothing happens.
2. No errors are being thrown in VB
3. Apartment threaded

I have the component running in the VB debugger and breakpoints in the
subroutine are not being trapped. Breakpoints in other routines are
consistently trapped.

After a bunch of tries, the breakpoint is trapped and the subroutine runs as
it should. Very wierd.




"Chris Barber" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Do you have On Error Resume Next in the ASP?
> Is the VB routine throwing an error.
> Is the VB DLL compiled as 'Apartment Threaded' and 'Unattended Execution'?
>
> How do you know that the routine is not being called? Have you run the DLL
> in debug mode?
>
> Chris.
>
> "Michael Farber" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Not sure if this is the right group for this but anyways...
> >
> > I've got an ASP web application that uses a Visual Basic component to do
> > some work. I instantiate the component in asp and then attempt to call

> the
> > subroutine. The subroutine is actually invoked maybe 2 out of 10 times

> run.
> > What could possibly be the reason for this?? Why the inconsistency in
> > running the subroutine?
> >
> > Cheers
> >
> >

>
>



 
Reply With Quote
 
Chris Barber
Guest
Posts: n/a
 
      07-18-2003
Are you certain that the call is being made (eg. run the web ASP code in
debug as well)?
Maybe its in an IF statement that is not being entered or you have a url
misnamed?

I've *never* come across an ASP page calling a VB routine that does not at
least attempt the call and either throw an error in the ASP or in the VB.

Chris.


"Michael Farber" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi, thanks for the reply.
>
> 1. ASP does have On Error Resume Next. I have disabled this to see what
> happens. Nothing happens.
> 2. No errors are being thrown in VB
> 3. Apartment threaded
>
> I have the component running in the VB debugger and breakpoints in the
> subroutine are not being trapped. Breakpoints in other routines are
> consistently trapped.
>
> After a bunch of tries, the breakpoint is trapped and the subroutine runs

as
> it should. Very wierd.
>
>
>
>
> "Chris Barber" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Do you have On Error Resume Next in the ASP?
> > Is the VB routine throwing an error.
> > Is the VB DLL compiled as 'Apartment Threaded' and 'Unattended

Execution'?
> >
> > How do you know that the routine is not being called? Have you run the

DLL
> > in debug mode?
> >
> > Chris.
> >
> > "Michael Farber" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Not sure if this is the right group for this but anyways...
> > >
> > > I've got an ASP web application that uses a Visual Basic component to

do
> > > some work. I instantiate the component in asp and then attempt to

call
> > the
> > > subroutine. The subroutine is actually invoked maybe 2 out of 10

times
> > run.
> > > What could possibly be the reason for this?? Why the inconsistency in
> > > running the subroutine?
> > >
> > > Cheers
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Dan Brussee
Guest
Posts: n/a
 
      07-18-2003
In article <(E-Mail Removed)>, chris@blue-
canoe.co.uk.NOSPAM says...
> Do you have On Error Resume Next in the ASP?
> Is the VB routine throwing an error.
> Is the VB DLL compiled as 'Apartment Threaded' and 'Unattended Execution'?
>
> How do you know that the routine is not being called? Have you run the DLL
> in debug mode?
>
> Chris.
>
> "Michael Farber" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Not sure if this is the right group for this but anyways...
> >
> > I've got an ASP web application that uses a Visual Basic component to do
> > some work. I instantiate the component in asp and then attempt to call

> the
> > subroutine. The subroutine is actually invoked maybe 2 out of 10 times

> run.
> > What could possibly be the reason for this?? Why the inconsistency in
> > running the subroutine?
> >


Just a thought. You mention that you are running the code in VB debug
mode to test it. Is it possible you have the compiled DLL in memory as
well at the same time? Make sure you unregister the DLL (assuming you
are not using COM+) and reboot.



--

Remove NOT from email address to reply. AntiSpam in action.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
use one subroutine's variable value in another subroutine inside a module. king Perl Misc 5 04-29-2007 06:39 AM
What is the difference between Visual Basic.NET and Visual Basic 6? Jimmy Dean Computer Support 3 07-25-2005 07:05 AM
using client-side component keeps calling component's init Jim Hammond ASP .Net 1 11-12-2003 08:13 PM
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET Jaime MCSD 2 09-20-2003 05:16 AM
Re: Calling a .NET component from a COM component remotely Soni ASP .Net 0 07-25-2003 04:33 AM



Advertisments