Re: Automating DTS conversion?
- From: "John Friel" <john@xxxxxxxxxxxx>
- Date: Thu, 30 Mar 2006 09:46:33 -0600
function ExecDTS(const PackageName: String): Boolean;
var
pVarHost: OleVariant;
EmptyStr: OleVariant;
pkg: OleVariant;
begin
pkg := CreateOLEObject('DTS.Package');
EmptyStr := WideString('');
pkg.LoadFromSQLServer('yourserver', 'userID',
'Password', 0, EmptyStr, EmptyStr,
EmptyStr, WideString(PackageName), pVarHost);
pkg.FailOnError := True;
for i := 1 to pkg.Steps.Count do
pkg.Steps.Item(i).ExecuteInMainThread := True;
pkg.Execute;
Result := True;
pkg.UnInitialize;
end;
Thank you Eddie. That works!
Question, when executing the DTS Package, the app freezes. Is there any way
to get status updates from the DTS package like Enterprise Manager? Maybe a
count of records so far etc? I'd even settle for it being able to slip in a
ProcessMessages once and a while so my app doesn't appear catatonic. Some
of the transfers can take 20 minutes to run.
Cheers, and THANKS AGAIN!
John
.
- References:
- Automating DTS conversion?
- From: John Friel
- Re: Automating DTS conversion?
- From: Chris Trueman
- Re: Automating DTS conversion?
- From: John Friel
- Re: Automating DTS conversion?
- From: Eddie Shipman
- Automating DTS conversion?
- Prev by Date: Re: INNER JOIN Using ADOQuery
- Next by Date: Re: Automating DTS conversion?
- Previous by thread: Re: Automating DTS conversion?
- Next by thread: Re: Automating DTS conversion?
- Index(es):