Page 1 of 1 1
Topic Options
#85088 - 2002-02-06 11:47 PM Calling COM+ Server?
Tommy Offline
Fresh Scripter

Registered: 2002-02-06
Posts: 5
I have created an ActiveX dll that inserts information into a SQL database. The dll works great when I call it from KiXtart on the COM+ server. How do I call the application from a remote client PC via KiXtart?

Any help is greatly appreciated,
Tommy

Top
#85089 - 2002-02-06 11:57 PM Re: Calling COM+ Server?
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Tommy, crap, i used to do this all the time but under the old NT DCOM way of doing things.

Dumb question ... did you build a standalone ActiveX server (.exe) or a inproc (.dll) snapin. If a snapin, are you running it under (what i used to call) MS Transaction Server (COM+) ?

What i used to do was (if memory serves) install and setup the dll in MTS as a package, then create an "export" package that would be moved to all the workstations and "installed" - this mini-install sets up all the proxy/stub info on the wks (required) ...

Then I used to administer the whole thingy using dcomcnfg.exe but under COM+, not too sure what gets used now.

Hope this help a little.

-Shawn

[ 07 February 2002: Message edited by: Shawn ]

Top
#85090 - 2002-02-07 06:32 AM Re: Calling COM+ Server?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Tommy,

Hope I don't go off on too much of a tangent here.

First, try this - http://www.avdf.com/oct98/art_ot004.html

Have you looked into using the RCMD Service for Windows 2000?

The server you are running this from, you will need to install the service and start it.. Then you could have these command executed on the server..

Otherwise, you would need to register the DLL and probably setup and ODBC Connection for each of your clients.

Shawn is right about dcomcnfg. Have you double-checked your permissions? Shoot, that is right.. You said it works right on the console. But, you may need to configure for remote execution..

Another way to do this is to:
"Call" your SQL Server remotely..

code:

$strconn = "Driver={SQL Server};Description=sqldemo;SERVER=127.0.0.1;UID=LoginID;PWD=Password;DATABASE=Database_Name"
; -- Build a recordset
$objRS = createobject("ADODB.Recordset")
$objRS.Open "select ID, strParent from Parents", $strconn
; -- etc.

Wait.. I found something that may help:
http://www.asp101.com/ado/18350704.asp

Look under the section - "Using the DataFactory Object Directly"

HTH,

- Kent

[ 07 February 2002: Message edited by: kdyer ]

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#85091 - 2002-02-08 03:27 AM Re: Calling COM+ Server?
Tommy Offline
Fresh Scripter

Registered: 2002-02-06
Posts: 5
Shawn and Kent,

First, thanks for the great responses.

Shawn: You are correct; you can export the COM+ application using the application proxy which will create an MSI file. You can then install the MSI on all of the workstations. The three negatives that I ran into are as follows 1) The user must be an administrator of the workstation 2) I have about 12,000 workstations to install this on, and 3) Microsoft installer has to be on all of the workstations (we still have a great deal of 9x and NT 4.0).

I believe my solution was in a round about way similar to Kent’s suggestion (at least I think they accomplish the same thing). The registry keys below had to be on the client workstations and then you can instantiate the COM object from KiXtart. Of course only an admin can add a key to HKEY_CLASSES_ROOT. To get around this, I wrote a quick program to remotely add the keys to all active workstations.

Thanks again for the assistance,
Tommy

[HKEY_CLASSES_ROOT\Project1.Class1]
@="Description for class Project1.Class1"

[HKEY_CLASSES_ROOT\Project1.Class1\Clsid]
@="{C645D8T5Y2F53-4339-5896-F1258DG8HR5A}"

[HKEY_CLASSES_ROOT\CLSID\{ C645D8T5Y2F53-4339-5896-F1258DG8HR5A }]
@="Description for class Project1.Class1"

[HKEY_CLASSES_ROOT\CLSID\{ C645D8T5Y2F53-4339-5896-F1258DG8HR5A }]
"AppID"="{C64CAD7E-60D3-4339-8286-A1090DC2B29A}"

[HKEY_CLASSES_ROOT\CLSID\{ C645D8T5Y2F53-4339-5896-F1258DG8HR5A }\ProgID]
@="Project1.Class1"

[HKEY_CLASSES_ROOT\APPID\{ C645D8T5Y2F53-4339-5896-F1258DG8HR5A }]
"RemoteServerName"="FLYER2002"

[HKEY_CLASSES_ROOT\APPID\{ C645D8T5Y2F53-4339-5896-F1258DG8HR5A }]
@="Description for class Project1.Class1"

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2312 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.054 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org