Wrox Programmer Forums
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 22nd, 2003, 10:52 AM
Ned Ned is offline
Authorized User
 
Join Date: Jun 2003
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hor to start COM+ services?

Does anybody know how to start/stop COM+ services from within VB?
Thanks,

-Ned
__________________
-Ned
 
Old August 3rd, 2004, 06:58 AM
Registered User
 
Join Date: Aug 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dim catalog
Dim collections
Dim application
Dim object
Dim components
Dim component
Dim Login
Dim Password
Dim URL

Login = "Varlogin"
Password = "VarPwd"
URL = "VarURL"

On Error Resume Next

'Navigate the COM+ Catalog
set catalog = CreateObject("COMAdmin.COMAdminCatalog")
set collections = catalog.GetCollection("Applications")
Call collections.Populate

For Each application In collections
wscript.echo application.Name

if application.Name = "Hub.Security" then
    set object = application
    object.Value("Identity") = Login
    object.Value("Password") = Password
End If

Next

'Navigating collections within components is a bit weird. 'You specify the call in form 'root.GetColllection(collectioname, objectkey)
'set components = collections.GetCollection("Components", object.key)
'components.Populate

'For Each component In components
' component.Value("ConstructorString") = URL
'Next

Call components.SaveChanges
Call collections.SaveChanges

catalog.StartApplication("ComponentName")

set catalog = Nothing
set collections = Nothing
set application = Nothing
set object = Nothing
set components = Nothing
set component = Nothing






Similar Threads
Thread Thread Starter Forum Replies Last Post
Don't know where to start......... Geneine Bugg BOOK: Beginning ASP 3.0 0 December 20th, 2006 12:00 PM
how to stop and start windows services from linux. [email protected] Linux 1 December 12th, 2006 07:53 AM
Where do I start? Michele_Haywood Access 1 November 2nd, 2006 09:39 AM
How to start COM+ services? Ned VB Components 1 August 26th, 2003 04:36 AM
Where to start? jerush Dreamweaver (all versions) 1 August 12th, 2003 07:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.