Board index » delphi » Using DMO to make DTS in Delphi application

Using DMO to make DTS in Delphi application

Hi

I wondered with DTS performance to transfer data from Paradox or DBF tables
to SQL and I need to build a application with these DTS features. Someone
knows how can I access DTS from my application ? I suppose that I need use
DMO, but what COM objects I must use ?

Regards

Pitty
pi...@esys.com.br

 

Re:Using DMO to make DTS in Delphi application


Quote
> Someone
>knows how can I access DTS from my application ? I suppose that I need use
>DMO, but what COM objects I must use ?

Import the "Microsoft DTSPackage Object Library"  type library.

Then use it with code like this

var
    FPackage : _Package;
    strPackageName : String;

const
  SQL_DATASOURCE = '(local)';
  SQL_USERID = 'sa';
  SQL_PWD = '';

begin
  FPackage := CoPackage.Create;
  FPackage.LoadFromSQLServer(SQL_DATASOURCE, WideString( SQL_USERID ),
           WideString( SQL_PWD ),DTSSQLStgFlag_Default,
           WideString(''), WideString(''),
           WideString(''),WideString( strPackageName ),EmptyParam);
   FPackage.Execute;
end;
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads