Hi Peter, I'm actually trying to import excel files via
DTS and was wondering whether the text files you import
have the same structure all the time or do you create the
DTS packages dynamically with COM, if you do can you show
me how you do it, I'm having a lot of problems creating
DTS packages with COM since my file structure changes all
the time. I'm not even sure whether I should create these
packages since I will probably not be able to reuse them,
really not sure what I should do. Any help would be great
and appreciated. Thanks a lot!
[quoted text, click to view] >-----Original Message-----
>I have a DTS that updates 2 tables from a VB6 application
>or from text files stored on the server . I am executing
>the DTS from a Visual Basic project using the code below
>
>Dim oPkg As New DTS.Package
>
>oPkg.LoadFromSQLServer ServerName:="ServerName",
>ServerUserName:="UserName",
>ServerPassword:="ServerPassword", PackageName:="DTS
>Package Name"
>
> oPkg.GlobalVariables.Item(1).Value = "Value"
>
> oPkg.Execute
>
>This is working fine, however the DTS package also runs
>as a Scheduled Task to import txt files uploaded by our
>clients. How can i dectect if the DTS is already
>running, or can i have two instances of the DTS running
>with both using different values for the Global varaibles?
>.
Mike,
Sorry for the long delay..
Part of my DTS is importing Text Files into 2 tables.
Although the files are in the same format all the time, i
am using activex components to dynamically set the
execute SQL tasks for the import. you should be able to
use active x tasks to set up 'ExecuteSQlTasks', or
DataPump tasks. this should give you the dynamic angle to
cope with the different file structures
Hope that helps
Pete
[quoted text, click to view] >-----Original Message-----
>Hi Peter, I'm actually trying to import excel files via
>DTS and was wondering whether the text files you import
>have the same structure all the time or do you create
the
>DTS packages dynamically with COM, if you do can you
show
>me how you do it, I'm having a lot of problems creating
>DTS packages with COM since my file structure changes
all
>the time. I'm not even sure whether I should create
these
>packages since I will probably not be able to reuse
them,
>really not sure what I should do. Any help would be
great
>and appreciated. Thanks a lot!
>
>>-----Original Message-----
>>I have a DTS that updates 2 tables from a VB6
application
>>or from text files stored on the server . I am
executing
>>the DTS from a Visual Basic project using the code below
>>
>>Dim oPkg As New DTS.Package
>>
>>oPkg.LoadFromSQLServer ServerName:="ServerName",
>>ServerUserName:="UserName",
>>ServerPassword:="ServerPassword", PackageName:="DTS
>>Package Name"
>>
>> oPkg.GlobalVariables.Item(1).Value = "Value"
>>
>> oPkg.Execute
>>
>>This is working fine, however the DTS package also runs
>>as a Scheduled Task to import txt files uploaded by our
>>clients. How can i dectect if the DTS is already
>>running, or can i have two instances of the DTS running
>>with both using different values for the Global
varaibles?
>>.
>>
>.
Don't see what you're looking for? Try a search.