![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is it possible to disable the DTS Bulk Insert task through ActiveX scripting if so can anybody direct me to some good documentation? Many thanks Simon |
#3
| |||
| |||
|
|
Is it possible to disable the DTS Bulk Insert task through ActiveX scripting if so can anybody direct me to some good documentation? Many thanks Simon |
#4
| |||
| |||
|
|
Look for the Step object and disable. Have a look here and I do it in my package (Not the Bulk Insert task but the theory is the same) points 2 & 4 Looping, Importing and Archiving (http://www.sqldts.com/Default.aspx?246) -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Simon Whale" <simon (AT) noway (DOT) ukdatait.com> wrote in message news:eOrIQUDNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Is it possible to disable the DTS Bulk Insert task through ActiveX scripting if so can anybody direct me to some good documentation? Many thanks Simon |
#5
| |||
| |||
|
|
Allan, have change the code in your example as suggested in step 4 SNIPPET if ShouldILoop = True then set BulkIns = pkg.Tasks("DTSTask_DTSBulkInsertTask_1").CustomTas k BulkIns.DisableTask = False BulkIns.DataFile = DTSGlobalVariables("gv_FileFullName").Value else .... .... End if END SNIPPET but when i run the package, i get the following error message Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: Object doesn't support this propery or method: 'BulkIns.DisableTask' Error on Line 21 Many Thanks for your help Simon Whale "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:us9qJrDNEHA.3572 (AT) tk2msftngp13 (DOT) phx.gbl... Look for the Step object and disable. Have a look here and I do it in my package (Not the Bulk Insert task but the theory is the same) points 2 & 4 Looping, Importing and Archiving (http://www.sqldts.com/Default.aspx?246) -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Simon Whale" <simon (AT) noway (DOT) ukdatait.com> wrote in message news:eOrIQUDNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Is it possible to disable the DTS Bulk Insert task through ActiveX scripting if so can anybody direct me to some good documentation? Many thanks Simon |
#6
| |||
| |||
|
|
There is no such method as DisableTask. Check my code again. I use DisableStep which is a method of the Step object. -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Simon Whale" <simon (AT) noway (DOT) ukdatait.com> wrote in message news:e5zD9ymNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Allan, have change the code in your example as suggested in step 4 SNIPPET if ShouldILoop = True then set BulkIns = pkg.Tasks("DTSTask_DTSBulkInsertTask_1").CustomTas k BulkIns.DisableTask = False BulkIns.DataFile = DTSGlobalVariables("gv_FileFullName").Value else .... .... End if END SNIPPET but when i run the package, i get the following error message Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: Object doesn't support this propery or method: 'BulkIns.DisableTask' Error on Line 21 Many Thanks for your help Simon Whale "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:us9qJrDNEHA.3572 (AT) tk2msftngp13 (DOT) phx.gbl... Look for the Step object and disable. Have a look here and I do it in my package (Not the Bulk Insert task but the theory is the same) points 2 & 4 Looping, Importing and Archiving (http://www.sqldts.com/Default.aspx?246) -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Simon Whale" <simon (AT) noway (DOT) ukdatait.com> wrote in message news:eOrIQUDNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Is it possible to disable the DTS Bulk Insert task through ActiveX scripting if so can anybody direct me to some good documentation? Many thanks Simon |
#7
| |||
| |||
|
|
Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: Object doesn't support this propery or method:'BulkIns.DisableStep this is the error message i get if i use the disablesetp method with the bulk insert task. Simon "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:eKlnW6mNEHA.1608 (AT) TK2MSFTNGP12 (DOT) phx.gbl... There is no such method as DisableTask. Check my code again. I use DisableStep which is a method of the Step object. -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Simon Whale" <simon (AT) noway (DOT) ukdatait.com> wrote in message news:e5zD9ymNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Allan, have change the code in your example as suggested in step 4 SNIPPET if ShouldILoop = True then set BulkIns = pkg.Tasks("DTSTask_DTSBulkInsertTask_1").CustomTas k BulkIns.DisableTask = False BulkIns.DataFile = DTSGlobalVariables("gv_FileFullName").Value else .... .... End if END SNIPPET but when i run the package, i get the following error message Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: Object doesn't support this propery or method: 'BulkIns.DisableTask' Error on Line 21 Many Thanks for your help Simon Whale "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:us9qJrDNEHA.3572 (AT) tk2msftngp13 (DOT) phx.gbl... Look for the Step object and disable. Have a look here and I do it in my package (Not the Bulk Insert task but the theory is the same) points 2 & 4 Looping, Importing and Archiving (http://www.sqldts.com/Default.aspx?246) -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Simon Whale" <simon (AT) noway (DOT) ukdatait.com> wrote in message news:eOrIQUDNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Is it possible to disable the DTS Bulk Insert task through ActiveX scripting if so can anybody direct me to some good documentation? Many thanks Simon |
#8
| |||
| |||
|
|
OK Here is code that I have just built and used successfully. Function Main() dim stp set stp = DTSGlobalVariables.Parent.Steps("DTSStep_DTSBulkIn sertTask_1") stp.DisableStep = True Main = DTSTaskExecResult_Success End Function -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Simon Whale" <simon (AT) noway (DOT) ukdatait.com> wrote in message news:u1fAd5nNEHA.628 (AT) TK2MSFTNGP11 (DOT) phx.gbl... Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: Object doesn't support this propery or method:'BulkIns.DisableStep this is the error message i get if i use the disablesetp method with the bulk insert task. Simon "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:eKlnW6mNEHA.1608 (AT) TK2MSFTNGP12 (DOT) phx.gbl... There is no such method as DisableTask. Check my code again. I use DisableStep which is a method of the Step object. -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Simon Whale" <simon (AT) noway (DOT) ukdatait.com> wrote in message news:e5zD9ymNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Allan, have change the code in your example as suggested in step 4 SNIPPET if ShouldILoop = True then set BulkIns = pkg.Tasks("DTSTask_DTSBulkInsertTask_1").CustomTas k BulkIns.DisableTask = False BulkIns.DataFile = DTSGlobalVariables("gv_FileFullName").Value else .... .... End if END SNIPPET but when i run the package, i get the following error message Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: Object doesn't support this propery or method: 'BulkIns.DisableTask' Error on Line 21 Many Thanks for your help Simon Whale "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:us9qJrDNEHA.3572 (AT) tk2msftngp13 (DOT) phx.gbl... Look for the Step object and disable. Have a look here and I do it in my package (Not the Bulk Insert task but the theory is the same) points 2 & 4 Looping, Importing and Archiving (http://www.sqldts.com/Default.aspx?246) -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Simon Whale" <simon (AT) noway (DOT) ukdatait.com> wrote in message news:eOrIQUDNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Is it possible to disable the DTS Bulk Insert task through ActiveX scripting if so can anybody direct me to some good documentation? Many thanks Simon |
#9
| |||
| |||
|
|
Allan, Thanks for that code it works, can you direct me to a good source that shows me what methods i can use with Bulk insert Task, as i want to also be able to specify the filename at runtime. again many thanks Simon but using your "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:OgoCbMoNEHA.3492 (AT) TK2MSFTNGP10 (DOT) phx.gbl... OK Here is code that I have just built and used successfully. Function Main() dim stp set stp = DTSGlobalVariables.Parent.Steps("DTSStep_DTSBulkIn sertTask_1") stp.DisableStep = True Main = DTSTaskExecResult_Success End Function -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Simon Whale" <simon (AT) noway (DOT) ukdatait.com> wrote in message news:u1fAd5nNEHA.628 (AT) TK2MSFTNGP11 (DOT) phx.gbl... Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: Object doesn't support this propery or method:'BulkIns.DisableStep this is the error message i get if i use the disablesetp method with the bulk insert task. Simon "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:eKlnW6mNEHA.1608 (AT) TK2MSFTNGP12 (DOT) phx.gbl... There is no such method as DisableTask. Check my code again. I use DisableStep which is a method of the Step object. -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Simon Whale" <simon (AT) noway (DOT) ukdatait.com> wrote in message news:e5zD9ymNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Allan, have change the code in your example as suggested in step 4 SNIPPET if ShouldILoop = True then set BulkIns = pkg.Tasks("DTSTask_DTSBulkInsertTask_1").CustomTas k BulkIns.DisableTask = False BulkIns.DataFile = DTSGlobalVariables("gv_FileFullName").Value else .... .... End if END SNIPPET but when i run the package, i get the following error message Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: Object doesn't support this propery or method: 'BulkIns.DisableTask' Error on Line 21 Many Thanks for your help Simon Whale "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message news:us9qJrDNEHA.3572 (AT) tk2msftngp13 (DOT) phx.gbl... Look for the Step object and disable. Have a look here and I do it in my package (Not the Bulk Insert task but the theory is the same) points 2 & 4 Looping, Importing and Archiving (http://www.sqldts.com/Default.aspx?246) -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Simon Whale" <simon (AT) noway (DOT) ukdatait.com> wrote in message news:eOrIQUDNEHA.2976 (AT) TK2MSFTNGP10 (DOT) phx.gbl... Is it possible to disable the DTS Bulk Insert task through ActiveX scripting if so can anybody direct me to some good documentation? Many thanks Simon |
![]() |
| Thread Tools | |
| Display Modes | |
| |