Home > Archive > Visual Basic > February 2005 > VB Build a DTS Package on the FLY
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
VB Build a DTS Package on the FLY
|
|
| bj richard 2005-02-25, 3:56 pm |
| Is it possible to have a VB application that allows a user to created a DTS
package from selection made on the VB form. The developer is creating
timesheet exports for different clients. There are many to create. The DTS
package includes connections to dattabases, excel spreadsheets,emailing the
client.
thanks
| |
|
| Yes, perfectly possible.
DTS is exposed as a COM library which should be registered if you've got SQL
Server client tools installed, I've built one in C# that transferred entire
tables without prior knowledge of their columns into Access before so
there's no reason why you can't do one in VB.
To see the code you need go into SQL Server enterprise manager, create a new
DTS then choose 'Actions' -> 'Save As' (or something) and then from the
types available to save to, one of them should be 'Visual Basic module'.
This will give you an idea of the COM code you could use as a base, you've
then obviously got to parameterize it if you want to do anything dynamic
with it. As with any autogenerated code you would also want to clean it up,
for instance it uses integers like "4" when you could use predefined
constants, like "DTSFlagOption2"
"bj richard" <bjrichard@discussions.microsoft.com> wrote in message
news:8285ED90-0D8B-4C45-B114-F0DE590B80C9@microsoft.com...
> Is it possible to have a VB application that allows a user to created a
> DTS
> package from selection made on the VB form. The developer is creating
> timesheet exports for different clients. There are many to create. The
> DTS
> package includes connections to dattabases, excel spreadsheets,emailing
> the
> client.
>
> thanks
|
|
|
|
|