![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I now have this code in Delphi: { Create the Ole object.} OlePack := CreateOleObject('DTS.Package'); { Load the package.} OlePack.LoadFromStorageFile('c:\dossier\MedImportH yr.dts', ''); OleTask := OlePack.Tasks.Item(1); OleCust := OleTask.CustomTask; OlePack.Execute; Which runs the MedImportHyr.dts package. This package imports a dBase V file into the database named Dossier. Now I would like to be able to say into which database it needs to be put from within the program (like a parameter). Is this possible? And what do I need to change to do so? Thanks in advance, Stijn Verrept. |
#3
| |||
| |||
|
|
There are two places that DB name is normally held for a DataPump task- The Connection's Catalog property. The DataPump's SourceObjectName property. The SourceObjectName is normally a three part name so this overrides the Catalog anyway, but if you just set a one or two part name for the SourceObjectName you can just use the Catalog instead. I don't know Delphi, but something like this should set the SourceObjectName- OleTask := OlePack.Tasks.Item("DTSTask_DataPumpTask_1"); OleCust := OleTask.CustomTask; OleCust.SourceObjectName = "[database].[dbo].[table]" |
![]() |
| Thread Tools | |
| Display Modes | |
| |