dbTalk Databases Forums  

ActiveX to execute Exec SQL task

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss ActiveX to execute Exec SQL task in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ben
 
Posts: n/a

Default ActiveX to execute Exec SQL task - 08-04-2005 , 12:56 PM






I have an activeX task that performs a loop and at the end of every loop i
want it to execute the exec sql task. I have tried:
Set objSQL =
DTSGlobalVariables.Parent.Tasks("DTSTask_DTSExecut eSQLTask_1").CustomTask
.....
objSQL.Execute

But i get an error "wrong number of arguments or invalide property"

How can this be done? The reason im doing it this way is that the query the
exec sql uses is dynamic to the current loop in the activeX control


thanks for any and all help!
Ben

Reply With Quote
  #2  
Old   
Peter A. Schott
 
Posts: n/a

Default Re: ActiveX to execute Exec SQL task - 08-04-2005 , 02:13 PM






Why not set the code for the ExecSQL using the Dynamic properties task and put
that right before the loop back to the beginning? That should work.

If the only change in the code is a parameter or piece of the where clause,
you may also be able to use Global Variables and the parameters function of
the Exec SQL task by placing a "?" every place you want to use a global
variable and then assigning those with the Parameters button.

-Pete

Ben <ben_1_ AT hotmail DOT com> wrote:

Quote:
I have an activeX task that performs a loop and at the end of every loop i
want it to execute the exec sql task. I have tried:
Set objSQL =
DTSGlobalVariables.Parent.Tasks("DTSTask_DTSExecut eSQLTask_1").CustomTask
.....
objSQL.Execute

But i get an error "wrong number of arguments or invalide property"

How can this be done? The reason im doing it this way is that the query the
exec sql uses is dynamic to the current loop in the activeX control


thanks for any and all help!
Ben


Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: ActiveX to execute Exec SQL task - 08-04-2005 , 02:29 PM



You can either wrap the statement into your Active Script task or you could
possibly adapt these

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)

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.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Ben" <ben_1_ AT hotmail DOT com> wrote

Quote:
I have an activeX task that performs a loop and at the end of every loop i
want it to execute the exec sql task. I have tried:
Set objSQL =
DTSGlobalVariables.Parent.Tasks("DTSTask_DTSExecut eSQLTask_1").CustomTask
.....
objSQL.Execute

But i get an error "wrong number of arguments or invalide property"

How can this be done? The reason im doing it this way is that the query
the
exec sql uses is dynamic to the current loop in the activeX control


thanks for any and all help!
Ben



Reply With Quote
  #4  
Old   
Ben
 
Posts: n/a

Default Re: ActiveX to execute Exec SQL task - 08-04-2005 , 02:45 PM



thanks for both your answers. But i think you might have missed my question.
When i attempt to execute the exec sql task, it get the aboved mentioned
error. what are the parameters its wanting? I would perfer if my code didnt
change much, I would like the activeX scipt to invoke the other tasks without
worriing about "on success" options. I could easily do this with an ADO
connection, but i want to attempt it this way as well. It gives it a more
visually appealing look.

Thanks again
Ben

"Allan Mitchell" wrote:

Quote:
You can either wrap the statement into your Active Script task or you could
possibly adapt these

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)

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.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Ben" <ben_1_ AT hotmail DOT com> wrote in message
newsD215127-9562-486D-A8FD-99EF755374B6 (AT) microsoft (DOT) com...
I have an activeX task that performs a loop and at the end of every loop i
want it to execute the exec sql task. I have tried:
Set objSQL =
DTSGlobalVariables.Parent.Tasks("DTSTask_DTSExecut eSQLTask_1").CustomTask
.....
objSQL.Execute

But i get an error "wrong number of arguments or invalide property"

How can this be done? The reason im doing it this way is that the query
the
exec sql uses is dynamic to the current loop in the activeX control


thanks for any and all help!
Ben




Reply With Quote
  #5  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: ActiveX to execute Exec SQL task - 08-04-2005 , 03:32 PM



I have never called the execute method on the task from inside another task
and do not know anyone else who does either.

You can though find the parameters you require in BOL

mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%2 0Server\80\Tools\Books\dtsprog.chm::/dtspmethai_4p0k.htm

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Ben" <ben_1_ AT hotmail DOT com> wrote

Quote:
thanks for both your answers. But i think you might have missed my
question.
When i attempt to execute the exec sql task, it get the aboved mentioned
error. what are the parameters its wanting? I would perfer if my code
didnt
change much, I would like the activeX scipt to invoke the other tasks
without
worriing about "on success" options. I could easily do this with an ADO
connection, but i want to attempt it this way as well. It gives it a more
visually appealing look.

Thanks again
Ben

"Allan Mitchell" wrote:

You can either wrap the statement into your Active Script task or you
could
possibly adapt these

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)

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.
www.SQLIS.com - You thought DTS was good. here we show you the new
stuff.
www.konesans.com - Consultancy from the people who know


"Ben" <ben_1_ AT hotmail DOT com> wrote in message
newsD215127-9562-486D-A8FD-99EF755374B6 (AT) microsoft (DOT) com...
I have an activeX task that performs a loop and at the end of every loop
i
want it to execute the exec sql task. I have tried:
Set objSQL =
DTSGlobalVariables.Parent.Tasks("DTSTask_DTSExecut eSQLTask_1").CustomTask
.....
objSQL.Execute

But i get an error "wrong number of arguments or invalide property"

How can this be done? The reason im doing it this way is that the
query
the
exec sql uses is dynamic to the current loop in the activeX control


thanks for any and all help!
Ben






Reply With Quote
  #6  
Old   
padavala
 
Posts: n/a

Default Re:ActiveX to execute Exec SQL task - 06-25-2009 , 04:11 PM



Hello,

Sorry for troubling you after many years.Did you find the solution for this?

I need exactly same functionality now.
Thanks.

url:http://www.ureader.com/msg/11461238.aspx

Reply With Quote
  #7  
Old   
matteog
 
Posts: n/a

Default Re: ActiveX to execute Exec SQL task - 06-26-2009 , 04:48 AM



On 25 Giu, 23:11, "padavala"<vpavanpadav... (AT) yahoo (DOT) com> wrote:
Quote:
Hello,

Sorry for troubling you after many years.Did you find the solution for this?

I need exactly same functionality *now.
Thanks.

url:http://www.ureader.com/msg/11461238.aspx
I see no reason for DTS letting you do this, but I cannot say for sure
it's not possible...
I guess this could bring you to break precedence constraints on tasks'
workflow.

Quote:
I could easily do this with an ADO connection
That's the solution, IMHO
Bye,
M.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.