Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I list all available DTS Packages using VB .NET?

DTS list Packages VB
0
Posted

How can I list all available DTS Packages using VB .NET?

0

There are many ways you can achieve this requirement. You can either use SQL-DMO to do the same. Or go for the conventional approach of using some queries on the database. In this example you will see that I would be using an in-built package to do the same. ‘ Copy from here … Dim strConn As String ‘Build a strConnection string or any other valid formats you are comfortable strConn = “Database=msdb;integrated Security=True;Server=<>” ‘Create a strConnection object Dim DTSConn As New System.Data.SqlClient.SqlstrConnection(strConn) ‘Create a command object with query and strConnection as arguments Dim DTSCmd As New System.Data.SqlClient.SqlCommand(“EXEC sp_enum_dtspackages”, DTSConn) ‘open the command’s strConnection object up DTSCmd.strConnection.Open() ‘Read all the data into a DataReader Dim DTSReader As System.Data.SqlClient.SqlDataReader =DTSCmd.ExecuteReader(Data.CommandBehavior.Default) ‘Loop through the collection of DTS Packages While DTSReader.Read() ‘Display the

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123