?
Solved

Need help with declaring an object

Posted on 2006-11-29
2
Medium Priority
?
497 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
Hillwaaa earned 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

777 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