Solved

Need help with declaring an object

Posted on 2006-11-29
2
491 Views
Last Modified: 2008-02-01
Friends,

I am trying desperately to solve an issue with with SSIS Package Variables.  I found a code snipit, but it won't compile.

It doesn't know what Dts. is, and neither do I.  please help!!!

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain

  Public Sub Main()

    Dim vars As Variables

    Dts.VariableDispenser.LockOneForWrite("vMyVar", vars)

    vars(0).Value = "Hello World"

    vars.Unlock()

    Dts.TaskResult = Dts.Results.Success

  End Sub

End Class

Thanks in advance!
0
Comment
Question by:indy500fan
2 Comments
 
LVL 16

Accepted Solution

by:
Hillwaaa earned 500 total points
ID: 18040975
Hi indy500fan,

Have you created a reference to the sqlserver dts runtime?  

DTS is: sql servers Data Transformation Services.

You can create the reference by right clicking on your solution (in the solution explorer) and click "add reference".  THen under the .NET tab, select "Microsoft.SqlServer.DTSRuntimeWrap".

That way your project will know what DTS is.

Cheers,
Hillwaaa
0
 

Author Comment

by:indy500fan
ID: 18044887
Hilwaaa,

I have done that, but unfortunately, it still says that Dts is not declared.

Dim Dts as New ????
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now