June 13, 2002 at 12:55 pm
Help!
I am trying to use the 'ExecuteSQL' task within a DTS package to call a stored procedure.
Example:
EXECUTE sp_TEST ?,?,?,?,?
Where the ? = seperate parameters.
However, the execution fails b/c it appears that the ExecuteSQL task can only support up to 3 parameters. The problem is that each stored proc that I call uses the same parameters. I am trying to cut down on the need to format variables inside the stored proc.
Example (contents of sp_TEST):
create proc sp_TEST
RUNID INTEGER,
STARTTIME DATE,
STOPTIME DATE,
ADDTIME DATE,
USERID VARCHAR (32)
AS
blah, blah, blah
If I can not pass them in then I will have to format them over and over. Any thoughts how I can avoid this headache?
Sean
June 13, 2002 at 2:16 pm
You could use the Dynamic Properties task to read in the values and alter the SQL statement. Would get ugly. I'd probably use an Active X Task instead.
Steve Jones
June 13, 2002 at 7:47 pm
Meant to test this today but have a project that I will be busy with. However what Steve is suggesting should do the trick.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
June 14, 2002 at 12:53 pm
Steve-
I am not sure what you are suggesting. Can I call a SP from an active x scrpt. If so, is there a limit to the number of parameters I can pass in.
I thought that maybe from each SP I could call a 'global variables' sp which set the values for a number of common variables used in each SP. However, it seems like you have to declare and set each variable IN EACH sp, so that won't work either.
I am interested to get more detail re: your active x solution.
Please advise.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply