dbTalk Databases Forums  

ActiveX Script Problem in DTS for Calling Store Proc with Paramete

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


Discuss ActiveX Script Problem in DTS for Calling Store Proc with Paramete in the microsoft.public.sqlserver.dts forum.



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

Default ActiveX Script Problem in DTS for Calling Store Proc with Paramete - 09-23-2004 , 12:43 PM






Hi,

In my DTS, I am using ActiveX Script to call SP. The reason I am using
ActiveX to call SP is I have to porcess many XML and load into SQL Server.
Here is my probelm

My Connection to SQL is works fine using ADODB, When I try to
call SP using Paramters that I am having problem. With out Parameter I am
able to excute SP.

When Include this line "Cmd.CommandType = adcmdStoredProc" than My process
fails with error messgae like "Arguments are wrong type or are out of
acceptable range "
set cmd.ActiveConnection= conn
Cmd.CommandType = adcmdStoredProc
Cmd.CommandText = "byroyalty"
cmd.Parameters.refresh
cmd.Parameters(1) = 10
cmd.Execute

What Do I need to change to call SP with paramters from ActiveX script ?

Thanks
-Kris







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

Default Re: ActiveX Script Problem in DTS for Calling Store Proc with Paramete - 09-23-2004 , 01:22 PM






Have you tried

Cmd.CommandType = 4

?


"Kris" <Kris (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,

In my DTS, I am using ActiveX Script to call SP. The reason I am using
ActiveX to call SP is I have to porcess many XML and load into SQL Server.
Here is my probelm

My Connection to SQL is works fine using ADODB, When I try to
call SP using Paramters that I am having problem. With out Parameter I am
able to excute SP.

When Include this line "Cmd.CommandType = adcmdStoredProc" than My process
fails with error messgae like "Arguments are wrong type or are out of
acceptable range "
set cmd.ActiveConnection= conn
Cmd.CommandType = adcmdStoredProc
Cmd.CommandText = "byroyalty"
cmd.Parameters.refresh
cmd.Parameters(1) = 10
cmd.Execute

What Do I need to change to call SP with paramters from ActiveX script ?

Thanks
-Kris









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.