none
When using parameterized MDX via OLEDB in SSAS, how many parameters we can use at most? RRS feed

  • Question

  • Currently, I try to use parameterized MDX via OLE DB, the MDX statement works fine with 3 parameters defined. But if define more than 3 parameters, it won't work. Don't know whther it is one limitation.
    • Edited by mangfan Monday, May 25, 2020 10:00 AM
    Monday, May 25, 2020 9:47 AM

Answers

  • I'm not aware of any specific limit on the number of parameters, but the OLEDB provider definitely supports lots more than 3 (I think I've seen around 13-14 used in actual production queries before). But I've tended to do this via reporting services or C#, I've never called OLEDB via C++. I'd suggest double checking the syntax of your query and seeing if there is any more specific error you can get other then "A provider specific error occurred". You could maybe try running a SQL Profiler trace and listening for Error events while trying to run your code.

    http://darren.gosbell.com - please mark correct answers

    • Marked as answer by mangfan Friday, May 29, 2020 2:22 AM
    Tuesday, May 26, 2020 12:42 AM
    Moderator

All replies

  • And which error message are you getting when you use more then 3 parameters?

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Monday, May 25, 2020 10:06 AM
  •  

    The error looks something like "No such interface supported (Windows API error -2147467262)". After calling Icommand::Execute, the last output parameter ppRowset is null pointer, and the funtion return E_FAIL(A provider-specific error occurred).

    When using 3 parameters, it works fine and the parameter ppRowset has correct address, the function retruns S_OK.

    Thanks for the reply.







    • Edited by mangfan Monday, May 25, 2020 10:31 AM
    Monday, May 25, 2020 10:14 AM
  • I'm not aware of any specific limit on the number of parameters, but the OLEDB provider definitely supports lots more than 3 (I think I've seen around 13-14 used in actual production queries before). But I've tended to do this via reporting services or C#, I've never called OLEDB via C++. I'd suggest double checking the syntax of your query and seeing if there is any more specific error you can get other then "A provider specific error occurred". You could maybe try running a SQL Profiler trace and listening for Error events while trying to run your code.

    http://darren.gosbell.com - please mark correct answers

    • Marked as answer by mangfan Friday, May 29, 2020 2:22 AM
    Tuesday, May 26, 2020 12:42 AM
    Moderator
  • Thanks for the reply, though still not resolve it. 

    I refine the question descripton and ask another question on SQL Server Analysis Service forum "

    when doing parameterized MDX query via ODBO(msolap.dll), if we define more than 3 parameters in our MDX statement, the function ICommand::Execute will return E_FAIL

    "


    Friday, May 29, 2020 2:24 AM