Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
lsharpe
Starting Member
1 Post |
Posted - 2004-03-30 : 10:48:30
|
| I have set up a DTS package on SQL2000 that has 2 GlobalVariables, one defined as a string and the other as and Integer. From a .NET application I'm wanting to set the values prior to executing the package. I'm setting the value by searching thru the GV collection and when I find the appropriate pre-defined GV,setting the value with odtsPackage.GlobalVariable(3).Value = CInt(LoadReseller)odtsPackage.GlobalVariable(4).Value = ResellerFileName.ToStringThe Integer is is working correctly, but everytime I set the value of the string GV I get the following error:Step Error Source: Microsoft Data Transformation Services (DTS) PackageStep Error Description:Error Code: 0Error Source= Microsoft VBScript runtime errorError Description: Invalid procedure call or argumentError on Line 5 (mscorlib (80004005): Missing parameter does not have a default value.Parameter name: parameters)Step Error code: 800403FEStep Error Help File:sqldts80.hlpStep Error Help Context ID:1100Any ideas what I'm doing wrong? |
|
|
drgrieve
Starting Member
1 Post |
Posted - 2005-02-22 : 20:02:43
|
| String Global variables need to be removed and readded.A clip of my code. 'Bug in DTS when calling from VB.NET, Global variables that are strings must be removed and readded oDTS.GlobalVariables.Remove("FileLocation") oDTS.GlobalVariables.Remove("DBServer") oDTS.GlobalVariables.AddGlobalVariable("FileLocation", ConfigurationSettings.AppSettings("TRSUploadNetworkLocation") & "TRS_DTS_Import.xls") oDTS.GlobalVariables.AddGlobalVariable("DBServer", ConfigurationSettings.AppSettings("DBServer")) |
 |
|
|
|
|
|