Scheduler execute_sql passing incorrect syntax

3 posts, 0 answers
  1. zx10r
    zx10r avatar
    14 posts
    Member since:
    Jul 2016

    Posted 05 Apr 2017 Link to this post

    I have a scheduler setup where the datasource select command also has a control parameter being passed in from a combo box. The generated execute_sql statement does not seem to work and sql server complains about parameter not being passed in. I have tried executing the generated statement manually in sql server and the result is the same. The code is bellow:


    SelectCommand="EXEC Scheduler.GetAppointments" 

                <asp:ControlParameter ControlID="cmbProviderSort" DbType="Int32" ConvertEmptyStringToNull="true" DefaultValue="-1" 
                    PropertyName="SelectedValue" Name="a" />


    The generated statement from this is : exec sp_executesql N'EXEC Scheduler.GetAppointments',N'@a int',@a=26

    If i try and execute that statement on sql server it complains the @a parameter is not being passed.


  2. zx10r
    zx10r avatar
    14 posts
    Member since:
    Jul 2016

    Posted 08 Apr 2017 Link to this post

    The issue was not specifying using the stored procedure statement type inside the data source.
  3. Eyup
    Eyup avatar
    3916 posts

    Posted 11 Apr 2017 Link to this post


    I am glad that you've managed to pinpoint the cause of the issue.
    Please note that this is a generic requirement not related to Telerik specifically. You can check various sources over the net about ControlParameters and Stored Procedures:

    If you have any questions related to the functionality of Telerik controls, please do not hesitate to contact us.

    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top