Calling a Visual Basic Component Subroutine from ASP

M

Michael Farber

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
 
C

Chris Barber

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.
 
M

Michael Farber

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.
 
C

Chris Barber

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.
 
D

Dan Brussee

chris@blue- said:
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.

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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top