![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've created DTS packages to copy tables from SQL Anywhere version 2.5 (AKA Sybase) to SQL Server 2000 & am executing them from Visual BASIC .NET. I'd like to limit the data copied by the Transform Data Task by date like this: SELECT column1, column2 FROM tablename WHERE (column2 >= inputdateparameter1) AND (column2 <= inputdateparameter2) So I need to be able to pass values for inputdateparameter1 and inputdateparameter2 from VB to the DTS package. How can this be done? Thanks in advance. |
#3
| |||
| |||
|
|
If you are inside VB.Net then why not change the SourceSQLStatement of the DataPump task You can do this from within the package and do this SELECT.............FROM...WHERE Column1 = ? and Column2 = ? In the package you would map the ? to global variables. You can pass values to the GVs from VB.Net through code in the object model if you want. You can of course have the package find values itself through the Dynamic Properties task. -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.SQLIS.com - You thought DTS was good. here we show you the new stuff. www.konesans.com - Consultancy from the people who know "Tyler" <Tyler (AT) discussions (DOT) microsoft.com> wrote in message news:925F166A-4224-4483-98CA-607F975C00E4 (AT) microsoft (DOT) com... I've created DTS packages to copy tables from SQL Anywhere version 2.5 (AKA Sybase) to SQL Server 2000 & am executing them from Visual BASIC .NET. I'd like to limit the data copied by the Transform Data Task by date like this: SELECT column1, column2 FROM tablename WHERE (column2 >= inputdateparameter1) AND (column2 <= inputdateparameter2) So I need to be able to pass values for inputdateparameter1 and inputdateparameter2 from VB to the DTS package. How can this be done? Thanks in advance. |
#4
| |||
| |||
|
|
Thanks for your reply. Could you please elaborate a bit on exactly how to "pass values to the GVs from VB.Net through code in the object model"? I've created global variables in my DTS package but there doesn't seem to be a way reference a DTS global variable or to change its value from VB. TIA. -- Tyler "Allan Mitchell" wrote: If you are inside VB.Net then why not change the SourceSQLStatement of the DataPump task You can do this from within the package and do this SELECT.............FROM...WHERE Column1 = ? and Column2 = ? In the package you would map the ? to global variables. You can pass values to the GVs from VB.Net through code in the object model if you want. You can of course have the package find values itself through the Dynamic Properties task. -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. www.SQLIS.com - You thought DTS was good. here we show you the new stuff. www.konesans.com - Consultancy from the people who know "Tyler" <Tyler (AT) discussions (DOT) microsoft.com> wrote in message news:925F166A-4224-4483-98CA-607F975C00E4 (AT) microsoft (DOT) com... I've created DTS packages to copy tables from SQL Anywhere version 2.5 (AKA Sybase) to SQL Server 2000 & am executing them from Visual BASIC .NET. I'd like to limit the data copied by the Transform Data Task by date like this: SELECT column1, column2 FROM tablename WHERE (column2 >= inputdateparameter1) AND (column2 <= inputdateparameter2) So I need to be able to pass values for inputdateparameter1 and inputdateparameter2 from VB to the DTS package. How can this be done? Thanks in advance. |
![]() |
| Thread Tools | |
| Display Modes | |
| |