Re: running DTS package in .Net-- no errors, but nothing happens?



Ok, I found the answer on my own. In the hopes that this helps someone in
the future, I accidentally set the "IsPackageDSORowset" flag to true when I
ported the code, whereas it had been false earlier. That's all it took...


"Jim Bancroft" <asdfsklw@xxxxxxxxxxx> wrote in message
news:OWgshwAiFHA.2424@xxxxxxxxxxxxxxxxxxxxxxx
> I'm stumped. I've ported the DTS library to my C# application (using the
> tips listed at http://SQLDev.Net/DTS/DotNETCookBook.htm) and rewrote my
> VB6 DTS package code in C#. However, when I execute it nothing happens.
>
> I turned on event log publishing with the
> "WriteCompletionStatusToNTEventLog " flag, but all I got was this
> informational message in the event log:
>
> -------------------
> The execution of the following DTS Package succeeded:
>
> <<snipped for brevity>>
>
> Total Execution Time: 0 seconds
> Package Steps execution information:
> Step 'DTSStep_DTSDataPumpTask_1' was not executed
> Step 'DTSStep_DTSExecuteSQLTask_1' was not executed
> ------------------
>
> I've cut out the boilerplate stuff at top, but rest assured no errors were
> reported.
>
> My DTS code is a straight port from what I had in VB6 (which was generated
> by the SQL 2000 wizard), with the same flags and everything else. For
> instance, here's the C# definition of one of the two steps referred to
> above:
>
> DTS.Step2 oStep;
> oStep = (DTS.Step2) goPackage.Steps.New();
> oStep.Name = "DTSStep_DTSDataPumpTask_1";
> oStep.Description = "Transform Data Task: undefined";
> oStep.ExecutionStatus = DTS.DTSStepExecStatus.DTSStepExecStat_Waiting;
> oStep.TaskName = "DTSTask_DTSDataPumpTask_1";
> oStep.CommitSuccess = false;
> oStep.RollbackFailure = true;
> oStep.ScriptLanguage = "VBScript";
> oStep.AddGlobalVariables = true;
> oStep.RelativePriority =
> DTS.DTSStepRelativePriority.DTSStepRelativePriority_Normal;
> oStep.CloseConnection = false;
> oStep.ExecuteInMainThread = false;
> oStep.IsPackageDSORowset = false;
> oStep.JoinTransactionIfPresent = true;
> oStep.RollbackFailure = true;
> goPackage.Steps.Add(oStep);
>
>
> When it comes time to run the package's Execute() method, it races
> through, like it's not even trying.
>
> My DTS code is surrounded in a try-catch statement, and no exceptions are
> raised. As an aside, I'm a little concerned with the "ScriptLanguage"
> attribute above (not using VBScript in .Net after all), but there's no
> "VB.Net" or "C#" attribute in DTS.
>
> I know it's difficult to diagnose what's happening given the incomplete
> package I've shown you above....what I was hoping for was general
> guidance, or maybe a pointer in the right direction with regard to getting
> all this to work in .Net. Has anyone managed to do what I'm trying, and
> are there additional debugging steps I can attempt? Thanks for the
> assistance!
>
>
>


.



Relevant Pages

  • RE: Isolating a DTS package
    ... you can create a DTS package status table that gets logged to ... at the beginning and the end of your DTS package execution. ... In SQL Server 2005, we will have a DTS Service that will allow us to monitor ...
    (microsoft.public.sqlserver.dts)
  • running DTS package in .Net-- no errors, but nothing happens?
    ... I turned on event log publishing with the "WriteCompletionStatusToNTEventLog ... " flag, but all I got was this informational message in the event log: ... The execution of the following DTS Package succeeded: ...
    (microsoft.public.sqlserver.dts)
  • Re: DTS package thru dot net
    ... Traditional COM based DTS? ... you have to use a COM wrapper to get at the bits. ... Dot net code calls a DTS package. ... However during code execution, the xls is renamed as say, abc.xls. ...
    (microsoft.public.dotnet.general)
  • Re: DTS text file source is using old data
    ... DTS does not cache files. ... Are you sure you are not getting confused about the execution location? ... > I have a DTS package that is called by a VB.NET program. ...
    (microsoft.public.sqlserver.dts)
  • Re: How to display progress bar in windows form during execution of DTS package?
    ... Since the time DTS takes may not be known, you may have a progress bar ... I want to display progress bar during execution of windows form. ... execute DTS package the form will idle till the DTS package finishes. ...
    (microsoft.public.dotnet.general)