Re: Thanks for your reply!
From: Allan Mitchell (allan_at_no-spam.sqldts.com)
Date: 07/13/04
- Next message: Darren Green: "Re: DTS pkg to VB6 to VB.Net problem"
- Previous message: TomTait747: "Re: bas file does nothing"
- In reply to: kris: "Re: Thanks for your reply!"
- Next in thread: anonymous_at_discussions.microsoft.com: "It doesn't work if it has begin ... end"
- Reply: anonymous_at_discussions.microsoft.com: "It doesn't work if it has begin ... end"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 13 Jul 2004 21:06:21 +0100
In article <2cbf401c4690f$b9df1f90$a301280a@phx.gbl>, Kris wrote:
> Actually! I modified it as follows and it worked.
>
> Function Main()
> dim conn, var
> set conn = DTSGlobalVariables.Parent.Steps
> ("DTSStep_DTSDataPumpTask_1")
> DTSGlobalVariables("WKADD").value = InputBox("Enter
> Current Month as 1, 2, 3, etc.")
> Main = DTSTaskExecResult_Success
> End Function
>
> The value from the inputbox is now in the GV. I am trying
> pass this into the Execute SQL Step (Script) as a
> condition.
>
> Thanks again.
> Kris.
>
> >-----Original Message-----
> >In article <2cad101c46901$93cb8950$a301280a@phx.gbl>,
> Kris wrote:
> >> oPkg.DisableStep = True
> >>
> >> oPkg.DisableStep = True
> >>
> >
> >The package object does not have a DisableStep method.
> >
> >Also, I do not consider DTS the right choice for user
> interaction. I
> >personally would rather I asked the user up front of
> executing the
> >package for any values they needed to supply.
> >
> >Also why do this
> >
> >oVAR = (DTSGlobalVariables("gvweek").Value)
> >oVAL = inputbox("Enter A Number ")
> >Set oVAR = oVAL
> >
> >Can you not do
> >
> >oVAL = inputbox("Enter A Number ")
> >DTSGlobalVariables("gvweek").Value = oVAL
> >
> >
> >You may want to do some checking of the value supplied
> also.
> >
> >
> >
> >Allan Mitchell (Microsoft SQL Server MVP)
> >MCSE,MCDBA
> >www.SQLDTS.com
> >www.konesans.com - for all your consultancy needs
> >
> >
> >
> >.
> >
>
Are you now asking for this next part of the puzzle?
Assuming you are using SQL Server 2000 then you statement will look
something like
SELECT col1, col2 FROM table WHERE col3 = ?
You will then see the parameters button which you can use to assign
your GV to the ?
If you are using SQL Server 7 (or if you want to do it this way, SQL
Server 2000) then you can do it also like this
Global Variables and SQL statements in DTS
(http://www.sqldts.com/Default.aspx?205)
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
www.konesans.com - for all your consultancy needs
- Next message: Darren Green: "Re: DTS pkg to VB6 to VB.Net problem"
- Previous message: TomTait747: "Re: bas file does nothing"
- In reply to: kris: "Re: Thanks for your reply!"
- Next in thread: anonymous_at_discussions.microsoft.com: "It doesn't work if it has begin ... end"
- Reply: anonymous_at_discussions.microsoft.com: "It doesn't work if it has begin ... end"
- Messages sorted by: [ date ] [ thread ]