dbTalk Databases Forums  

Re: DTS Packages and Parameters

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: DTS Packages and Parameters in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS Packages and Parameters - 07-11-2003 , 01:39 AM






OK Let me see if I get your situation

You set some GV values in the parent and pass then through to the child.
The child uses the value (GV) in a query but the parameter value is nested.

If this is the case then say you wanted to use the GV in an ExecuteSQL task
in the child then I would use a piece of Active Script task to set the
statement of the task before the actual ExecuteSQL task.

i.e.

Global Variables and SQL statements in DTS
http://www.sqldts.com/default.aspx?6,102,205,7,1

--


Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Grant" <jamanella (AT) hotmail (DOT) com> wrote

Quote:
Greetings

I've set up a DTS package that contains an ActiveX
script task that sets 2 datetime global variables. The
next steps are Execute Package tasks that receive these
global datetime variables as parameters.

All is well except a few of the packages being called
have the parameters in nested queries. The error thrown
is "Parameter Information cannot be derived from SQL
statements with sub-select queries. Set parameter
information before preparing command" I've seen plenty
of ADO KB articles in which a solution is presented but
nothing with respect to how this can be done inside the
query portion of a DTS package.

Does anyone know if this can be done or if an alternative
is present. I've worked with SQL for several years but
only lightly with DTS packages. My end goal is to call
several packages that all have date criteria but only
want to change the date in one location instead of in
EVERY package.

Any insight would be greatly appreciated.

Thanks



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.