ExecuteSQL task has changed

Since the last IDW.

The column "ParameterName" has been added to the ParameterMapping tab of the ExecuteSQL task.

I enter a statement of

SELECT * FROM TABLE WHERE COLUMN = ?

I map ? to a input variable. The default name of the parameter supplied is "NewParameterName"

My task now fails with

Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "SELECT * FROM TheBigOne WHERE HostName = ?" failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Task failed: Execute SQL Task
What parameter? The one the task supplies?

Allan

[751 byte] By [AllanMitchell] at [2008-3-3]
# 1
Allan
I was able to get passed this by putting ? in the paramter name column.

Norman P.

Np4120 at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 2
I cannot get it to work even using that and it would kinda make no sense either because what if I had

SELECT X FROM TABLE WHERE DATE BETWEEN ? AND ?

What would be the Parameter Names?

Allan

AllanMitchell at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 3
Ok so i just got it to work

say I have a statement of

SELECT AddressID
FROM Person.Address
WHERE City = ?

The parmeter name should be @City

I could not find this anywhere in the docs.

Allan

AllanMitchell at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 4
Allan,

Are you using a managed provider?

ash

AshSharma at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 5
Allan
I tried it your way which works but also used ? in both paramter names and it also worked provided the paramters where in the correct order.

Norman P.

Np4120 at 2007-9-8 > top of Msdn Tech,SQL Server,SQL Server Integration Services...

SQL Server

Site Classified