473,394 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

VB 6.0 com+ automation

rhitam30111985
112 100+
Hi all . i am trying to deploy a set of com+ components to create a server . M aim is to first delete all the existing components and replace them with new ones to avoid duplication ... Here is my code :




Expand|Select|Wrap|Line Numbers
  1. Dim catalog As COMAdmin.COMAdminCatalog
  2. Dim Applications As COMAdmin.COMAdminCatalogCollection
  3. Dim Application As COMAdmin.COMAdminCatalogObject
  4. Dim Components As COMAdmin.COMAdminCatalogCollection
  5. Dim comps As COMAdmin.COMAdminCatalogObject
  6. Dim ComDllName As COMAdmin.COMAdminCatalogObject
  7. Dim Index  As Integer 
  8.  
  9.  
  10. Set catalog = New COMAdmin.COMAdminCatalog
  11. Set Applications = catalog.GetCollection("Applications")
  12. Call Applications.Populate
  13.  
  14.  For Each comps In Applications
  15.   On Error Resume Next
  16.       Dim orchapplication As Integer
  17.       applicationname = InStr(1, comps.Name, "somename", vbTextCompare)
  18.       If Not applicationname  = 0 Then
  19.            Set Components = Applications.GetCollection("Components", comps.Key)
  20.            Call Components.Populate
  21.            For Index = 0 To Components.Count - 1
  22.                 Components.Remove (Index)
  23.                 If Err Then
  24.                    AppendStatus (comps.Name & "  " & Err.Description & "  " & Err.Source)
  25.                    Else
  26.                    AppendStatus (Components.Item(Index).Value("Name") & "  was removed ")
  27.                 End If
  28.                 Next
  29.           Components.SaveChanges
  30.       End If
  31.     Next
  32.  
  33.  
assume appentstatus function writes to a log file . whenever i try to remove the components as above . it logs the error as "Invalid procedure call or argument"


any idea where i might be going wrong ?

I have tried putting the following statement also before removing :
Components(Index).Value("Deletable") = True

But this doesnt work either

Any help appreciated .
Oct 1 '08 #1
0 1127

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: qwweeeit | last post by:
Hi all, Elliot Temple on the 1 June wrote: > How do I make Python press a button on a webpage? I looked at > urllib, but I only see how to open a URL with that. I searched > google but no...
1
by: Jimmer | last post by:
I've got what should be an easy automation problem, but the solution simply isn't coming to me. I've got several public variables set up for automation as follows: Public gappExcel As...
12
by: D. Shane Fowlkes | last post by:
This most likely belongs in another forum but I thought I'd start here. I have a COM Object written in VB6. The DLL will access MS Excel and use it's Object Library to write a customized report...
3
by: Carlos Magalhaes | last post by:
Hey All, I am doing some excel automation using the excel COM. I can do most of the functions and its working well until I come across a formula. I can run a formula and insert the formula...
0
by: Sharath | last post by:
Quality Globe is Glad to Offer you the Fast Track course on Automation, QTP Basics and Advanced, and Quality Center Starting Date: June 4th, 2007 Timings: 10 AM to 3:30 PM Duration: 50 Hours ...
0
by: Sharath | last post by:
"Inspired" by the huge success of our first two automation fast track batches We are forced to start third fast track automation batch ...
0
by: Sharath | last post by:
We are glad to inform you that "Inspired" by the huge success of our first three automation fast track batches We are forced to start fourth fast track automation batch ...
0
by: Sharath | last post by:
We are glad to inform you that "Inspired" by the huge success of our first four automation fast track batches We are forced to start fifth fast track automation batch ...
0
by: xrxst32 | last post by:
Hello there, I have some doubts about the best practice for using COM automation, the Runtime Callable Wrapper (RCW) and Marshal.ReleaseComObject. So the question is/are: Do I need to release...
0
by: madihamir | last post by:
Iam new to .net and have gotten assignment for make the class library to automate the outlook I have tried to done it but i've to make the Handlers also . Detecting an methods for receiving and...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.