Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 17th, 2004, 09:57 AM
jcarter33 jcarter33 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 1 jcarter33 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cool DTS Parameter Incorrect from VB

I am attempting to load a DTS package from VB.NET. I can load it and can execute it if there are no parameters involved. Also, hardcoding the parameters in the global parameters tab of the package properties and assigning them to the first step works great within SQL Enterprise Manager. However, everything that I have tried when loading into a VB environment comes back with an invalid parameter and the first step failing. I need to pass integer values to the first step (which executes an sp). However, I've tried strings, variants, etc and converting. All giving me the same result. Can someone please help?

pkg = New DTS.Package
Dim cpContainer As UCOMIConnectionPointContainer
cpContainer = CType(pkg, UCOMIConnectionPointContainer)
Dim cpPoint As UCOMIConnectionPoint
Dim guid As Guid = New Guid("10020605-EB1C-11CF-AE6E-00AA004A34D5")
cpContainer.FindConnectionPoint(guid, cpPoint)
Dim intCookie AsInteger

pkg.LoadFromSQLServer("WRCDevDB\DevelopmentDB", "AlvinApp", "1baddawg", _

DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, _

"", "", "", "CreateandWriteEFTFile",
Nothing)

pkg.GlobalVariables.Item("ai_eftid").Value = ai_EftID
pkg.GlobalVariables.Item("ai_userid").Value = ai_UserId

ForEach stp In pkg.Steps
stp.ExecuteInMainThread = True
Next

( I read on another posting to execute the step before the pkg identifies the variable, but that didn't work either)
stp.Execute()
pkg.FailOnError =
True
pkg.Execute()


Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft SQL Server > DTS Parameter Incorrect from VB


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT