Re: running DTS package in .Net-- no errors, but nothing happens?
- From: "Jim Bancroft" <asdfsklw@xxxxxxxxxxx>
- Date: Wed, 20 Jul 2005 10:14:44 -0700
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!
>
>
>
.
- References:
- running DTS package in .Net-- no errors, but nothing happens?
- From: Jim Bancroft
- running DTS package in .Net-- no errors, but nothing happens?
- Prev by Date: Re: sql reindex
- Next by Date: Re: Output Sql server data to populate PDF forms via vb.net 2003
- Previous by thread: running DTS package in .Net-- no errors, but nothing happens?
- Next by thread: Multiple Transform Tasks between 2 connections - Failure
- Index(es):
Relevant Pages
|