Oledb Source Variable mapping issue (Visual Studio 2019 with SSIS Version 16.0.521.0)

Gopinath Desai 46 Reputation points
2022-06-06T04:32:18.133+00:00

Hi All,
I am having issue while mapping SQL variable to SSIS variable in OLEDB source.
Here is what happening :

  1. I have upgraded from Visual Studio from 2015 to Visual Studio 2019 with SSIS Version 16.0.521.0 & SQL Server Data Tools 16.0.62205.05200.
  2. I have changed Provider from "Native OLE DB\SQL Server Native Client 11.0" to "Native OLE DB\Microsoft OLE DB Provider For SQL Server"

That's it, when i change the provider i was not able access parameter & Parse the query.
Attached snapshot.

Please help what am missing here or provider will not allow the way that am doing.208595-vs2019-varable-mapping-issue.png

Error :

TITLE: Microsoft Visual Studio

------------------------------

Parameters cannot be extracted from the SQL command. The provider might not help to parse parameter information from the command. In that case, use the "SQL command from variable" access mode, in which the entire SQL command is stored in a variable.

------------------------------

ADDITIONAL INFORMATION:

Syntax error or access violation (Microsoft OLE DB Provider for SQL Server)

SQL Server Integration Services
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ZoeHui-MSFT 41,536 Reputation points
    2022-06-07T06:26:46.84+00:00

    Hi @Gopinath Desai ,

    Try to follow the suggestion and create a variable.

    Create a package variable
    Double click on the package variable name. (This allows you to access the properties of the variable)
    Set the property 'EvaluateAsExpression' to true
    Enter the query in the expression builder.
    Set the OLE DB source query to SQL Command from Variable

    A same thread you may take a reference to.

    how-to-resolve-sql-query-parameters-mapping-issues-while-using-oracle-ole-db-pro

    Regards,

    Zoe


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.