Solved

ActiveX component not responding message.

Posted on 1998-11-04
3
329 Views
Last Modified: 2011-10-03
I have developed an ActiveX application that provides a class that will be used by other applications for handling communications.  I find that when I'm stress testing the component, (i.e pumping alot of data through it from many applications.) I will often get the message that the component is not responding.  There are option buttons asking if I want to retry, or switch to the component to correct the problem.  I have looked at the App property, OLEServerBusyRaiseError, and that sounds like it should solve the problem for me by trapping the error in my client program, but it doesn't seem to have any effect.  I still get the message on the screen instead of an error being raised in my client.  Has anybody ever run into this problem before?
0
Comment
Question by:jsuper
3 Comments
 
LVL 1

Expert Comment

by:CarlosJac
ID: 1443176
Try compiling your activex as a DLL activex.
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 100 total points
ID: 1443177
The message about server is busy means that an out of process ole server is taking to long. Therefor CarlosJac answer would make the message go away since the message only appears on  out of process applications.
The problem is that you try to click on your application while your application is waiting for an answer of the server. You can't trap it. Your application is just busy. You can however make your application more responsive by using multi-threading for the client or server. Multi-threading programming is rather hard in VB so don't try it unless you know a lot about VB internals.
The real problem is that your server is taking to much time to perform its actions. Make it faster :-)
Another solution is the usage of timers and make the calls to the server asynchious. That means that the client does not wait until the server is finished but the server tells the client when it is finished.

Here is a sample:
- Client calls function of server
- Server starts timer and returns immediatelly from call
- Clients continues
- Server receives timer message and starts doing the action make sure that the server knows its busy so that it won't try to do another call.
- Client calls to the server result in error at this time since the server is busy (you have to take care of that yourself, raise an error in the server when the server is in a timer message) This can be compared to the message you see only now you are in control in stead of COM.
- Servers raises event to say that it is finished
- Client recieves event and knows that the server has finished.

This is a littlebit hard to program but very workable in a lot of situations.

Hope this explains what you see in your application.

0
 
LVL 1

Author Comment

by:jsuper
ID: 1443178
I see what you are saying, but I will not be able to recode the server side to handle asynchronous requests... It's just too much work for this application...   What I think I'll do is caus e the out of process server to reject connections over a certain limit.  This isn't an ideal solution, but it also should happen very infrequently.  Thanks for your input!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question