Thanks for your help. I really appreciate it.
I have a variable in my SQL statement. I am trying to pass
this value from the GV into that.
parameter as the GV. The statement could not be prepared.
it has BEGIN... END. or may be to another variable.
>-----Original Message-----
>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
>
>
>
>.