0xC0017011 and other error messages – what is the error message text?

Recently there was a bug raised against BIDS Helper which originated in my Expression Editor control. Thankfully the person that raised it kindly included a screenshot, so I had the error code (HRESULT 0xC0017011) and a stack trace that pointed the finger firmly at my control, but no error message text. The code itself looked… Continue reading 0xC0017011 and other error messages – what is the error message text?

Exploring packages in code

In my previous post Searching for tasks with code you can see how to explore the control flow side of packages, drilling down through containers, task, and event handlers, but it didn’t cover the data flow. I recently saw a post on the MSDN forum asking how to edit an existing package programmatically, and the… Continue reading Exploring packages in code

Searching for tasks with code – Executables and Event Handlers

Searching packages or just enumerating through all tasks is not quite as straightforward as it may first appear, mainly because of the way you can nest tasks within other containers. You can see this illustrated in the sample package below where I have used several sequence containers and loops. To complicate this further all containers… Continue reading Searching for tasks with code – Executables and Event Handlers

Maintaining packages with code – Adding a property expression programmatically

Every now and then I’ve come across scenarios where I need to update a lot of packages all in the same way. The usual scenario revolves around a group of packages all having been built off the same package template, and something needs to updated to keep up with new requirements, a new logging standard… Continue reading Maintaining packages with code – Adding a property expression programmatically

Creating packages in code – Package Configurations

Continuing my theme of building various types of packages in code, this example shows how to building a package with package configurations. Incidentally it shows you how to add a variable, and a connection too. It covers the five most common configurations: Configuration File Indirect Configuration File SQL Server Indirect SQL Server Environment Variable  For… Continue reading Creating packages in code – Package Configurations

Creating packages in code – Flat File Source to OLE-DB Destination (SQL Server)

This code sample programmatically creates a package that imports a text file into SQL Server, with a Flat File Source and the OLE-DB Destination. This shows how you can leverage the SSIS engine to write your own data import tool for example, but beware importing files is not as simple as it may seem. When… Continue reading Creating packages in code – Flat File Source to OLE-DB Destination (SQL Server)

Creating packages in code – OLE-DB Source to Flat File File Destination

This code sample programmatically creates a package with an OLE-DB Source and a Flat File Destination, and the resulting package exports data from SQL Server to a CSV file. The finished package just has the one Data Flow Task shown below.   The code creates the package, configures the task, and components, then saves the… Continue reading Creating packages in code – OLE-DB Source to Flat File File Destination