I am trying to add construction strings to a component, I ahve managed to get as far as locating the component, however the next step is proving a little tricky.
All examples I have seen use VB and NOT VBscript, my problem is the follwoing line of code
DIM varname AS COMAdminCatalogObject
How can I do this in VBscript, I need to get to the objects to set the constructor strings, if the above line was to work then I could do
varname.value("ConstructorString" = "Provider=MSADORA"
varname.SaveChanges
example below, I have converted to VBscript it is only the last Dim statement that I am having problems with.
:
Dim objCatalog As COMAdmin.COMAdminCatalog
Set objCatalog = CreateObject("COMAdmin.COMAdminCatalog"
Dim objTopCollection As COMAdmin.COMAdminCatalogCollection
Set objTopCollection = objCatalog.GetCollection("TopCollection"
objTopCollection.Populate
Dim objItem As COMAdmin.COMAdminCatalogObject
For Each objItem in objTopCollection
If objItem.Name = "ItemName" Then
objItem.Value("PropertyName" = NewPropValue
Exit For
End If
Next
objAppCollection.SaveChanges
Any help appreciated
Regards
Steve Friday
All examples I have seen use VB and NOT VBscript, my problem is the follwoing line of code
DIM varname AS COMAdminCatalogObject
How can I do this in VBscript, I need to get to the objects to set the constructor strings, if the above line was to work then I could do
varname.value("ConstructorString" = "Provider=MSADORA"
varname.SaveChanges
example below, I have converted to VBscript it is only the last Dim statement that I am having problems with.
:
Dim objCatalog As COMAdmin.COMAdminCatalog
Set objCatalog = CreateObject("COMAdmin.COMAdminCatalog"
Dim objTopCollection As COMAdmin.COMAdminCatalogCollection
Set objTopCollection = objCatalog.GetCollection("TopCollection"
objTopCollection.Populate
Dim objItem As COMAdmin.COMAdminCatalogObject
For Each objItem in objTopCollection
If objItem.Name = "ItemName" Then
objItem.Value("PropertyName" = NewPropValue
Exit For
End If
Next
objAppCollection.SaveChanges
Any help appreciated
Regards
Steve Friday