Solved

Need help with declaring an object

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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