![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Using SS2000 and VB6. I'm trying to list the packages on a server in a list box. Then the user will choose a package and I'll display the steps in the package. This is the code: Set oPackageInfos = oPackageSQLServer.EnumPackageInfos("", True, "") 'This is the technique to use to iterate a collection returned 'from a method Set oiPackageInfo = oPackageInfos.Next Dim namX As NameList Set namX = oiPackageInfo.Name For i = 1 To namX.Count lstPackages.AddItem namX.Item(i) Next Set oiPackageInfo = oPackageInfos.Next I get a type mismatch error on this line - Set namX = oiPackageInfo.Name Any ideas? Thanks, Dan D. |
#3
| |||
| |||
|
|
In message <eEdknO$eEHA.4092 (AT) TK2MSFTNGP10 (DOT) phx.gbl>, Dan ddonahue (AT) archermalmo (DOT) com> writes Using SS2000 and VB6. I'm trying to list the packages on a server in a list box. Then the user will choose a package and I'll display the steps in the package. This is the code: Set oPackageInfos = oPackageSQLServer.EnumPackageInfos("", True, "") 'This is the technique to use to iterate a collection returned 'from a method Set oiPackageInfo = oPackageInfos.Next Dim namX As NameList Set namX = oiPackageInfo.Name For i = 1 To namX.Count lstPackages.AddItem namX.Item(i) Next Set oiPackageInfo = oPackageInfos.Next I get a type mismatch error on this line - Set namX = oiPackageInfo.Name Any ideas? Thanks, Dan D. Not sure what a NameList is, but you cannot Set an object to a string. Judging by you naming convention lstPackages is a ListView control, so you want to use ListItem anyway. e.g. Set oListItem = lvwResults.ListItems.Add(, "K" & oPkgInfo.Name, , , "Fred") -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org |
![]() |
| Thread Tools | |
| Display Modes | |
| |