Re: Disabling DTS Bulk insert task

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Simon Whale (simon_at_noway.ukdatait.com)
Date: 05/10/04


Date: Mon, 10 May 2004 12:50:41 +0100

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
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: does Ado.Net 2.0 have bulk insert functionality?
    ... Bulk ops. ... "Rich" wrote in message ... >> textfiles using a DTS package converted from vb6 to ... >> circumventing this error message with a SendKeys ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: Looking for good Bulk Reverse Lookup (Whois/Arin)
    ... Simon - have you contacted ARIN directly and asked? ... Kansas City, MO. ... Looking for good Bulk Reverse Lookup (Whois/Arin) ... I want to do a bulk IP lookup on a bunch of IP's And for the ones not ...
    (Security-Basics)
  • Re: Looking for good Bulk Reverse Lookup (Whois/Arin)
    ... Choose this site for the bulk ip lookup ... KKDU ... > Simon - have you contacted ARIN directly and asked? ...
    (Security-Basics)
  • Re: Bulk Insert for data with quotes
    ... DTS has nothing to do with it. ... the BI Task is a wrapper around the BULK ... It does work if you use a format file. ... Allan Mitchell MCSE,MCDBA, ...
    (microsoft.public.sqlserver.dts)
  • Trapping error messages
    ... I'm making a BULK INSERT opperation from a stored ... BULK INSERT Import ... Let's say there is some error in the format of my text ... Is there a way to trap the above error message that tells ...
    (microsoft.public.sqlserver.programming)