SQL Task failes with "The task reported failure on execution" -
12-07-2005
, 10:47 AM
Hi:
I have a SQL task that does merely this:
SELECT * FROM myTable WHERE SiteName = ?
There is one string input parameter which is a string
(gv_CurrentSite-and looking at the global variables page in package
properties the global variable value was set correctly) and one output
parameter, which is a recordset global variable (gv_AllDates). I get
the "The task reported failure on execution" Step Error Code 8004043B.
It is not a rights problem.
I supect it is a problem with the previous activeX task that set the
gv_CurrentSite value. I set this value in this task by reading a value
from another recordset global variable. I noticed that the package
propterties page that gv_CurrentSite has been set to type "dispatch"
after the package runs, which is normally what happens when you set a
gv with a recordset. By gv_CurrentSite should just be a string.
Just to give the flow of tasks:
SQL Task 1 sets recordset gv_AllSites using ouput variable
ActiveX Task 1 uses this gv_AllSites recordset to set gv_CurrentSite
SQL Task 2 (above mentioned point of failure) uses gv_CurrentSite in
WHERE clause, and sets recordset gv_AllDates.
Here is the code from ActiveX Task1 that sets gv_CurrentSite:
Dim SiteValue
Set SiteValue = objRS.Fields(0)
Set DTSGlobalVariables("gv_CurrentSite").Value = SiteValue
Is my hypothesis right? If so, why is it setting the gv_CurrentSite to
type 'dispatch', when the value of objRS.Fields(0) is just a string?
Thanks,
Kayda |