3

I couldn't find the option to pass a parameter to the ODBC Source? I could see lot of article related to this but I couldn't find the same option in the Data flow Task expression. The [ODBC Source].[SqlCommand] isn't in the of the Data Flow task.

Property expression

The article I referred as below:

Can anyone please help on this?

4
  • Out of interest, why are you using an ODBC connection and not an OLEDB? Unless my memory is failing me, I'm pretty sure BIDS/SQL Server 2008 supported OLEDB. Commented Feb 4, 2019 at 15:59
  • What are you using in SSIS where your trying to pass variable? Or something else. If an Execute SQL task? If so you can build out your SQL statement in a variable in SSIS using expressions and in your SQL task use variable instead of input text. Commented Feb 4, 2019 at 17:53
  • I want to connect IBM Netezza and execute a query passing a date parameter to it. SQL task won't work here Commented Feb 4, 2019 at 18:11
  • What are the SQL Server and visual studio and SSDT versions you are working with? Commented Feb 4, 2019 at 18:56

1 Answer 1

0

I think that the property is missing due to a mismatch between Visual Studio , SSDT and SQL Server versions. First, you have to check that you are using the relevant and appropriate versions, you can check the following links for more information:

Also try to check the package Target Server Version:

Similar issues links


Update 1

While searching on this issue, i found that [ODBC Source].[SqlCommand] property might be not found in versions earlier than 2012 (2005,2008), but i found a link that mentioned a workaround:

You can easily put in params if the source is an OLE DB source, but what if it is an ODBC Source? You have to use the DataReader source, and you can’t easily set params – like a WHERE statement. You HAVE to use Expressions in order to have a query with a dynamic WHERE statement or passing in a variable as WHERE statement filter.

So, throw a DataFlow on your package, and inside that, throw a DataReader source, and then set the connection to your ODBC Connection (ADO.NET Connection) and set the command text.

Sign up to request clarification or add additional context in comments.

1 Comment

Will check regarding the mismatch. The version VS 2017 (SSDT) Version 15.9.4 .SSIS Target version 2016 & SQl Server :Microsoft SQL Server 2016 (SP2-CU2) (KB4340355) - 13.0.5153.0 (X64)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.