I am implementing expression parameter for a SQL Server connection string (like this: http://danajaatcse.wordpress.com/2010/05/20/using-an-xml-configuration-file-and-expressions-in-an-ssis-package/) and it works fine except when it reaches data flow task - OLE DB Source task. In this task, I execute a stored procedure like this:
exec SelectFromTableA ?,?,?
The error message is this:
0xC0202009 at Data Flow Task, OLE DB Source [2]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description: "Syntax error or access violation".
Error: 0xC004706B at Data Flow Task, SSIS.Pipeline: "OLE DB Source" failed validation and returned validation status "VS_ISBROKEN"
When I change the SQL command above with reading from table directly it works fine. I should also add that before changing connection string of the SQL data source to use expression, the SSIS package was working fine and I know that the connection string is fine because other tasks in the package works fine!
Any idea why?