Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute SQL Task - How To Reference Parameter

Status
Not open for further replies.

Skittle

ISP
Sep 10, 2002
1,528
US
I have an EXECUTE SQL TASK within a FOR EACH LOOP over an ADO recordset.

I want to use a parameter in the EXECUTE SQL TASK from an ADO recordset column. To be precise, I want execute this command:-

Code:
UPDATE MySQLTable
SET Column1 = 'X'
WHERE Column2 = @MyParam

I have set the ParameterMapping properties on the EXECUTE SQL TASK as:-
VariableName: USer::MyCol2
Direction: Input
DataType: VARCHAR
ParameterNAme : MyParam

The problem is, I get the error 'parameter name is unrecognized' when I run the package. I have tried '?' on it's own instead of the @MyParam but this doesn't work either. Can anybody spot where I am going wrong with the parameter comparisson/definition?




Dazed and confused
 
Does USer need to be User? I know the scope would not be USer, so it could just be an issue of case sensitivity.

At a glance, I don't see any other problems (it is supposed to be the ? though, if you are using Oledb connection).

This may be worth a read to make sure you've taken care of everything:

Hope this helps,

Alex

[small]----signature below----[/small]
Majority rule don't work in mental institutions

My Crummy Web Page
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top