Solved

Remote Async AvtiveX exe

Posted on 2001-06-14
11
219 Views
Last Modified: 2010-05-02
What I have is users who request reports, at the moment the reports run multiple queries that take some time to run, which lockes their workstation.  What I would like them to do is start an ActiveX exe, on a server, to run asynchronously which will create and save the reports then notify the user via e-mail that they are ready for collection.  This allows the user to get on with his/her business and even log off the workstation/go home etc.

I have created an activeX exe that does the business and it works well if it runs on the client machine (not what I want).  

I cannot get my head round the method to install it on the server and then let the client machines know it is available.

Using VB6sp5, NT4, TCP/IP network

OK, I know(??) there must be some document somewhere that will tell me how to do this but....

TIA
Richard
0
Comment
Question by:RichardCorrie
  • 4
  • 3
  • 2
  • +1
11 Comments
 
LVL 2

Expert Comment

by:chandukb
ID: 6190945
You need to use DCOM to call the ActiveXExe methods.

Client Program can call DCOM methods asynchronously, but I am not sure about logging off the workstation before comepleting the task.


Chandu
0
 

Expert Comment

by:rhubarbtwo
ID: 6191033
I have a similar problem where I want to run an activeX.exe on a remote server. Have you seen the article in the MSDN library titled 'The Remote Automation Enigmas', it was listed when I did a search for 'vbr'?
0
 
LVL 5

Expert Comment

by:AndrewDev
ID: 6191119
After installing your Active X Exe you need to
1) Register the server by running as follows:
   Run Myserver / regserver

2) run DCOMCNFG to configure its permissions

3) On the client run CLIREG32 to register the servers .vbr file. (This tells the client where the server lives)

If you write your server with a method to accept its requests into some form of queue, then process them. It is fine to log off the client. If you simply call a class to do the job you may and I emphasise may experience some problems. ie. The call from your client to the server needs to complete fully before logging off to be sure of results. So if I were you I would queue the requests.

Regards
Andrew
0
 

Expert Comment

by:rhubarbtwo
ID: 6191352
I see that DCOM supercedes Remote Automation

Have you seen http://support.microsoft.com/support/kb/articles/Q266/7/17.ASP
0
 
LVL 5

Expert Comment

by:AndrewDev
ID: 6191380
Thanks rhubarbtwo
That was the article I was looking for to append to my above post. It describes more fully what I put in the steps above.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Expert Comment

by:chandukb
ID: 6191562

>
If you simply call a class to do the job you may and I emphasise may experience some problems. ie. The call from your client to the server needs to complete fully before
logging off to be sure of results. So if I were you I would queue the requests.
>


AndrewDev, is absolutely right, I just finished an DCOM app with asynchronous events and the client has to wait until the server finishes the called method.  And I don't know what u means by 'queue the requests'.  Any Articles or info???

Chandu


0
 

Expert Comment

by:rhubarbtwo
ID: 6191854
AndrewDev, can you help me further with my question 'Manually setting up DCOM Client/Server app' just posted?
0
 
LVL 10

Author Comment

by:RichardCorrie
ID: 6192188
thanks for your responses, looking good. I will check out dcomconfig etc.

Still looking for the client to be able to log off/continue without having to wait for the server exe to complete.

How can I queue as request on the server?

Richard
0
 

Expert Comment

by:rhubarbtwo
ID: 6194615
Could you employ a timer in the activeX component which kicks off the job, and set the necessary properties required for the job prior to enabling the timer object; as in Pino Carafa's example at http://www.carobit.com/Feedback/ShowThread.asp?ThreadNumber=20010402084949Pino%20Carafa

Perhaps the call to the timer could be queued in a collection in the activeX component?
0
 
LVL 5

Accepted Solution

by:
AndrewDev earned 75 total points
ID: 6194954
What I ment by queue the requests was create a queue using say a collection in the Active X Server which contains your request so that the client-server interaction is completed by putting the request on the queue.

The queue would be serviced by a timer so that the actual real work does not involve the client at all. It can be logged off once it has submitted its job.

Hope this helps
Andrew

0
 
LVL 10

Author Comment

by:RichardCorrie
ID: 6216239
Andrew has given me the road to an answer; many thanks to all who contributed

Richard
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now