Solved

Need help with declaring an object

Posted on 2006-11-29
2
492 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

912 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

26 Experts available now in Live!

Get 1:1 Help Now