Re: Disabling DTS Bulk insert task
From: Allan Mitchell (allan_at_no-spam.sqldts.com)
Date: 05/10/04
- Next message: MarielC: "scheduled jobs not running"
- Previous message: m3ckon: "Access upsizing using DTS"
- In reply to: Simon Whale: "Re: Disabling DTS Bulk insert task"
- Next in thread: Darren Green: "Re: Disabling DTS Bulk insert task"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 May 2004 15:11:52 +0100
BOL is excellent for this
You want the DataFile property
mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Books\dts
prog.chm::/dtsptasks_3b5g.htm
-- -- 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@noway.ukdatait.com> wrote in message news:O9G8GUoNEHA.3988@TK2MSFTNGP09.phx.gbl... > 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@no-spam.sqldts.com> wrote in message > news:OgoCbMoNEHA.3492@TK2MSFTNGP10.phx.gbl... > > OK > > > > Here is code that I have just built and used successfully. > > > > > > Function Main() > > > > dim stp > > > > set stp = DTSGlobalVariables.Parent.Steps("DTSStep_DTSBulkInsertTask_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@noway.ukdatait.com> wrote in message > > news:u1fAd5nNEHA.628@TK2MSFTNGP11.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@no-spam.sqldts.com> wrote in message > > > news:eKlnW6mNEHA.1608@TK2MSFTNGP12.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@noway.ukdatait.com> wrote in message > > > > news:e5zD9ymNEHA.2976@TK2MSFTNGP10.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").CustomTask > > > > > 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@no-spam.sqldts.com> wrote in message > > > > > news:us9qJrDNEHA.3572@tk2msftngp13.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@noway.ukdatait.com> wrote in message > > > > > > news:eOrIQUDNEHA.2976@TK2MSFTNGP10.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 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
- Next message: MarielC: "scheduled jobs not running"
- Previous message: m3ckon: "Access upsizing using DTS"
- In reply to: Simon Whale: "Re: Disabling DTS Bulk insert task"
- Next in thread: Darren Green: "Re: Disabling DTS Bulk insert task"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|