Free Newsletters:
DatabaseJournal  
DBANews
Search Database Journal:
 
HOME News MS SQL Oracle DB2 Access MySQL PostgreSQL PHP SQL Etc Scripts Links Discussion
internet.com

» HOME
» NEWS
» FEATURES
» SERIES
MS SQL
Oracle
MS Access
MySQL
DB2
» RESOURCES
Products
Scripts
Links
» DISCUSSION
» TECH JOBS

Marketplace Partners
Be a Marketplace Partner




internet.commerce
Be a Commerce Partner
Online Education
Hurricane Shutters
Condos For Sale
Cell Phones
Laptops
Corporate Awards
Disney World Tickets
Phone Cards
Online Universities
Compare Prices
Dental Insurance
Holiday Gift Ideas
Auto Insurance Quote
Car Donations




MySpace Joins eBay, Yahoo in Open Profile Push

News Corp. Unit Under Fire for Ties to Hacker

Are Non-PC Devices Hurting 'Net Innovation?

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Linked Data Planet Conference & Expo

CA ERwin® Data Modeler Proven database design and modeling. Efficiently analyze, design and deploy effective database solutions. Whitepaper: Manage SQL Server Deployments
Try it free: CA ERwin® Data Modeler


Guide to Oracle 11g and Database Migration
Oracle Database 11g includes more features for self-management and automation, which makes it easier for customers to cost-effectively manage their data. Download this Internet.com eBook for an overview of some of the new features in 11g and for an overview of the issues you need to consider as you prepare for a database migration. »
Innovate Faster with Oracle Database 11g
Read this in-depth analysis of 56 customers, which shows significant differences between the value software vendors Oracle and SAP deliver to midsize companies. »
Oracle Business Intelligence Standard Edition One
Find out how Newport Beach, CA-based Mobilitie is shaking up the telecom industry by leveraging technology to provide an entirely different financial model for deploying, upgrading, and owning wireless and wireline network assets. »
Business Intelligence and Enterprise Performance Management: Trends for Emerging Businesses
Quickly implementing an ERP software solution can be of tremendous benefit; however, companies often struggle to balance the benefits of reducing implementation time and cost with the risks of an accelerated deployment. Read this white paper to learn about easy-to-follow best practices for achieving a successful accelerated implementation. »
Making the Case for Oracle Database on Windows
Users benefit as vendors reduce enterprise complexity and deliver integration. »

Production Manager (hands on)
Aquent
US-MA-Cambridge

Justtechjobs.com Post A Job | Post A Resume
MS SQL
February 10, 2003
How to run a DTS VB package in the .NET framework
James Horne

Overview

Data Transformation Services (DTS) remain an important tool in the arsenal of database administrators and web designers that need to move data between data repositories. These repositories can include SQL Server 2000, a variety of other databases as well as text files, and Excel files. You're also being compelled to move towards the Visual Studio .NET framework as you move forward with software development based on the Microsoft platform. Therefore, you will invariably run into the problems outlined below.

With ten minutes of cleanup, you can use a DTS package generated by SQL Server 2000 within the Visual Studio .NET framework. You'll have all the benefits of running in the Visual Studio .NET framework, and be able to programmatically control the behavior of the DTS package. This article will get you there quickly while navigating a path that isn't always straight forward.

There are two important reasons why you'll want to do this.

  • The .NET environment provides the common language runtime (CLR) with improved memory management. Utilizing the CLR is critical in a web-based application that needs to run for multiple days without running out of memory.
  • If you develop your web application against a development SQL Server and then run it against a production SQL Server, you'll find it cumbersome to configure the data source/destination of a DTS package saved as meta data or in structured storage. However, you can easily configure the data connections in your saved VB package to reflect the various stages of your release process.

The rest of this article explains exactly how to do this upgrade, and then how to apply some of the common edits required to bring the code completely up to standard. Microsoft has also provided documentation on the changes to the Visual Basic language. You can also reference Visual Basic .NET upgrade guide. or Upgrading Applications Created in Previous Versions of Visual Basic for further information.

Introduction

Microsoft has built an upgrade tool into the .NET environment to migrate old VB code into the CLR of the .NET framework. You will need this tool since SQL Server 2000 service pack 2 still generates VB code targeted to Visual Basic 6.0. This code makes assumptions that are not valid in the .NET framework

As a test case, I created a very simple DTS package that reads two columns from one text file and writes the exact same columns into another text file using a Transform Data Task. The compiler errors in this article are typical. You may get different or additional errors depending on how you've set up your package.

Upgrade Steps:

  1. Use SQL Enterprise Manager to edit your DTS Package and make sure that it works. I personally like to get things working as well as possible in this environment because it's harder to manually make changes to the saved VB package.
  2. Save the package as a VB program dtsPackage.bas. (You can use any name.)
  3. Create a VB .exe project in Visual Basic 6.0.
  4. Reference into the new project "Microsoft DTS Custom Tasks Object Library," "Microsoft DTSDataPump Scripting Object Library," and "Microsoft DTSPackage Object Library."
  5. Include dtsPackage.bas in the new project.
  6. Compile and run the project. This will give you confidence that the package will really work in the Visual Basic 6.0 environment.
  7. Save/close the project.
  8. Launch Visual Studio .NET.
  9. Open the 6.0 project from Visual Studio .NET. This will automatically invoke the upgrade wizard. The upgrade wizard will do the following:
    • Create a new project folder and copy all the relevant Visual Studio 6.0 files into this folder.
    • Create a new project and solution file.
    • Create Interop dll's for each COM library that was referenced by the Visual Studio 6.0 project.
    • Upgrade dtsPackage.bas as well as any other VB code in the project. The upgraded code has hyperlinks to guide you to more descriptive documentation about the nature of the problems found.
    • Create an upgrade report that summarizes what happened in the upgrade (_UpgradeReport.htm).
  10.   Fix the remaining errors as outlined below.
  11.   Compile/run the project within Visual Studio .NET.

Note: Creation of Interop DLL's

All the referenced DTS dlls shipped with SQL Server 2000 run as COM libraries. To interface these libraries into the Visual Studio .NET environment, wrapper dll's are created which provide the necessary metadata information required by the common language runtime to interface with the DTS COM libraries. (Interop.DTSCustTasks.dll, Interop.DTSPump.dll, and Interop.DTS.dll) The good news is that these wrappers are provided for free by the upgrade tool. More Info

Go to page: 1  2  3  Next  

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

MS SQL Archives

Learn about expanding business opportunities for the reseller channel. Visit IT Channel Planet.
Download: SQL Compare Pro 6--The fastest, easiest way to compare and synchronize two databases.
Download: SQL Backup & DBA Best Practices eBook
IT in 2018: Download Free eBook By The Author Of "Does IT Matter?" Simple Registration Is Required.
Flash Demo: Learn how IBM Information Server Blade is easy to manage, highly scalable and efficient.


Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
How To Transfer Access Data Records To SQL ?? ankurdjariwala 1 May 8th, 12:24 PM
problem with federated server linking majidkhan 1 April 29th, 10:00 AM
"SELECT rowguidcol" from tables on linked servers? brentbordelon 1 April 25th, 04:12 PM
"SELECT rowguidcol" vs. "SELECT <actual name>" rgarrison 9 April 16th, 03:46 PM







JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: HyperV-The Killer Feature in WinServer ‘08
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Win Server ‘08
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES