none
Parameter button grayed out in data connection for SQL query RRS feed

  • Question

  • Hello all,

    I am trying to use parameters in a SQL query for an external data connection. However the Parameter button grayed out in data connection options box.

    I have used ? in the query definition.

    What might I be doing wrong?

    Many thanks,

    Ben


    Mr Shaw... One day I might know a thing or two about SQL Server!

    Tuesday, June 28, 2016 3:27 PM

Answers

All replies

  • Hi Mr Shaw,

    From the description of the thread its looks like you are using User Interface of Excel Application.

    This Forum handles the issues regarding Excel Object Model.

    so for better response and better solution to your issue I move this thread to excel it pro discussions forum.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, June 29, 2016 2:26 AM
  • Hi Ben,

    How did you create connection in Excel?

    About your problem, I suggest you refer to this article about how to Getting Data From Parametized SQL Query.

    http://snippetsandhelp.blogspot.sg/2013/05/excel-2013-getting-data-from.html

    Please refer to these steps and confirm if your steps correct.

    Any updates please let me know and I'm glad to help you.


    Regards,

    Emi Zhang
    TechNet Community Support


    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, June 30, 2016 7:11 AM
    Moderator
  • Hi Emi,

    I'm landed here searching for the same issue.

    I've followed all the instructions but all test are conducting to the same result: Parameters box greyed out

    The query works perfectly with dynamic parameters but I'm unable to use a cell as an parameter.

    I'm running Win 7 and Office 2016

    Regards,

    Maurizio


    • Edited by Alpha-4 Thursday, May 18, 2017 4:35 PM
    Thursday, May 18, 2017 4:34 PM
  • Hi Maurizio,

    Here is small hack that may assist you: http://shahzy1.blogspot.com.au/2014/06/sql-server-parameterized-queries-in.html

    The author of that page recommends adding a where clause to the Command Text field of the Connection Properties dialogue box. When you do so, like magic, the parameters box pops up!

    Doug

    Monday, January 22, 2018 2:58 AM