Solved

Need help with declaring an object

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net - KeyPress Event 4 38
How to seperate number and letters from a string 3 22
Very Large data in MYSQL 7 73
Name Space error VS2015 1 26
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 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