dbTalk Databases Forums  

listing dts packages

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss listing dts packages in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dan
 
Posts: n/a

Default listing dts packages - 08-06-2004 , 03:26 PM






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.



Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: listing dts packages - 08-06-2004 , 04:19 PM






In message <eEdknO$eEHA.4092 (AT) TK2MSFTNGP10 (DOT) phx.gbl>, Dan
<ddonahue (AT) archermalmo (DOT) com> writes
Quote:
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



Reply With Quote
  #3  
Old   
Dan
 
Posts: n/a

Default Re: listing dts packages - 08-09-2004 , 09:30 AM



Thanks.
"Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote

Quote:
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




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.