![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
oPkg.DisableStep = True oPkg.DisableStep = True |
#3
| |||
| |||
|
|
-----Original Message----- In article <2cad101c46901$93cb8950$a301280a (AT) phx (DOT) 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 . |
#4
| |||
| |||
|
|
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 (AT) phx (DOT) 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 . |
#5
| |||
| |||
|
|
-----Original Message----- In article <2cbf401c4690f$b9df1f90$a301280a (AT) phx (DOT) 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 (AT) phx (DOT) 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 . |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
-----Original Message----- I do not know why you would need to do this as an assignment. You can get around the delicacies of the design time interface but show me the whole statement and we can work something out. Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com www.konesans.com - for all your consultancy needs . |
![]() |
| Thread Tools | |
| Display Modes | |
| |