Must declare the scalar variable...

11 posts, 0 answers
  1. Bryon
    Bryon avatar
    4 posts
    Member since:
    May 2009

    Posted 28 May 2009 Link to this post

    Hello there. I recently tried using the demo code for the inline grid editing feature hosted on Telerik's website. However, I keep getting the error: Must declare scalar variable '@username'. Any thoughts?

    <%@ Page Title="" Language="C#" MasterPageFile="~/Index.master" AutoEventWireup="true"
        CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <%@ Register TagPrefix="Custom" TagName="Block" Src="~/Block.ascx" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

            <script type="text/javascript">
            <!--
                var hasChanges, inputs, dropdowns, editedRow;

                function RowClick(sender, eventArgs) {
                    if (editedRow && hasChanges) {
                        hasChanges = false;
                        if (confirm("Update changes?")) {

                            $find("<%= RadGrid1.MasterTableView.ClientID %>").updateItem(editedRow);
                        }
                    }
                }

                function RowDblClick(sender, eventArgs) {
                    editedRow = eventArgs.get_itemIndexHierarchical();
                    $find("<%= RadGrid1.MasterTableView.ClientID %>").editItem(editedRow);
                }

                function GridCommand(sender, args) {
                    if (args.get_commandName() != "Edit") {
                        editedRow = null;
                    }
                }

                function GridCreated(sender, eventArgs) {
                    var gridElement = sender.get_element();
                    var elementsToUse = [];
                    inputs = gridElement.getElementsByTagName("input");
                    for (var i = 0; i < inputs.length; i++) {
                        var lowerType = inputs[i].type.toLowerCase();
                        if (lowerType == "hidden" || lowerType == "button") {
                            continue;
                        }

                        Array.add(elementsToUse, inputs[i]);
                        inputs[i].onchange = TrackChanges;
                    }

                    dropdowns = gridElement.getElementsByTagName("select");
                    for (var i = 0; i < dropdowns.length; i++) {
                        dropdowns[i].onchange = TrackChanges;
                    }

                    setTimeout(function() { if (elementsToUse[0]) elementsToUse[0].focus(); }, 100);
                }

                function TrackChanges(e) {
                    hasChanges = true;
                }
         -->    
            </script>

        </telerik:RadCodeBlock>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                        <telerik:AjaxUpdatedControl ControlID="Label1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <br />
        <telerik:RadGrid ID="RadGrid1" DataSourceID="SessionDataSource1" Width="97%" ShowStatusBar="True"
            AllowSorting="True" PageSize="7" GridLines="None" AllowPaging="True" runat="server"
            AllowAutomaticUpdates="True" OnItemUpdated="RadGrid1_ItemUpdated" AutoGenerateColumns="False"
            OnDataBound="RadGrid1_DataBound" Skin="WebBlue">
            <HeaderContextMenu EnableTheming="True">
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
            </HeaderContextMenu>
            <MasterTableView TableLayout="Fixed" DataKeyNames="username" EditMode="PopUp">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn UniqueName="username" DataField="username" HeaderText="username"
                        ReadOnly="True" HeaderStyle-Width="10%" SortExpression="username">
                        <HeaderStyle Width="10%"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn  ReadOnly="true" UniqueName="password" DataField="password" HeaderText="password"
                        HeaderStyle-Width="25%" SortExpression="password">
                        <HeaderStyle Width="25%"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn UniqueName="isAdmin" DataField="isAdmin" HeaderText="isAdmin"
                        HeaderStyle-Width="20%" SortExpression="isAdmin">
                        <HeaderStyle Width="20%"></HeaderStyle>
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="First_name" HeaderText="First_name" SortExpression="First_name"
                        UniqueName="First_name">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Last_name" HeaderText="Last_name" SortExpression="Last_name"
                        UniqueName="Last_name">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Effective_date" DataType="System.DateTime" HeaderText="Effective_date"
                        SortExpression="Effective_date" UniqueName="Effective_date">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="RAC" HeaderText="RAC" SortExpression="RAC" UniqueName="RAC">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" OnGridCreated="GridCreated"
                    OnCommand="GridCommand" />
            </ClientSettings>
            <FilterMenu EnableTheming="True">
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
            </FilterMenu>
        </telerik:RadGrid>
        <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="180px" />
        <telerik:GridDropDownListColumnEditor ID="GridDropDownListColumnEditor1" runat="server"
            DropDownStyle-Width="70px" />
        <telerik:GridCheckBoxColumnEditor ID="GridCheckBoxColumnEditor1" runat="server" CheckBoxStyle-BorderWidth="2" />
        <telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server" NumericTextBox-Width="50px" />
        <br />
        <asp:Label ID="Label1" runat="server" EnableViewState="false" />
        <br />
        <asp:SqlDataSource ID="SessionDataSource1" ConnectionString="<%$ ConnectionStrings:RVCConnectionString %>"
            OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [users]"
            runat="server" ConflictDetection="CompareAllValues" UpdateCommand="UPDATE [users] SET [password] = @password,[isAdmin] = @isAdmin,[First_name] = @First_name,[Last_name] = @Last_name,[Effective_date] = @Effective_date,[RAC] = @RAC WHERE [username] = @username">
            <UpdateParameters>
                <asp:Parameter Name="username" Type="String" />
                <asp:Parameter Name="password" Type="String" />
                <asp:Parameter Name="isAdmin" Type="String" />
                <asp:Parameter Name="firstName" Type="String" />
                <asp:Parameter Name="lastName" Type="String" />
                <asp:Parameter Name="Effective_date" Type="DateTime" />
                <asp:Parameter Name="RAC" Type="String" />
            </UpdateParameters>
        </asp:SqlDataSource>
    </asp:Content>
  2. Bryon
    Bryon avatar
    4 posts
    Member since:
    May 2009

    Posted 29 May 2009 Link to this post

    Any help at all?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 01 Jun 2009 Link to this post

    Hello Bryon,

    It seems that the value for the username field is not found when update command takes place. Can you please check whether the same error occurs when you attach the same SqlDataSource control to regular MS GridView and specify the username through its DataKeyNames collection? If so, you will probably need to modify your data source configuration/Sql backend to avoid it.

    Best regards,

    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Bryon
    Bryon avatar
    4 posts
    Member since:
    May 2009

    Posted 01 Jun 2009 Link to this post

    I actually didn't have to with the MS Gridview.

    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" DataSourceID="SessionDataSource1">
            <Columns>
                <asp:CommandField ShowEditButton="True" />
            </Columns>
        </asp:GridView>

    That code worked for editting.

    I added DataKeyNames="username" into the ms gridview and it still worked.


  6. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 01 Jun 2009 Link to this post

    Hi Bryon,

    I do not see from your code snippet that you set the DataKeyNames property of the ms GridView control in this case. Can you please define it and compare the result with our web grid when hooked to the same data source?
    Regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Bryon
    Bryon avatar
    4 posts
    Member since:
    May 2009

    Posted 01 Jun 2009 Link to this post

    <asp:GridView DataKeyNames="username" ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" DataSourceID="SessionDataSource1">
            <Columns>
                <asp:CommandField ShowEditButton="True" />
            </Columns>
        </asp:GridView>

    That works. =P
  8. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 01 Jun 2009 Link to this post

    Hello Bryon,

    To progress in our investigation, I will appreciate if you prepare a simple project which holds MS GridView instance and our web grid bound to the same data source control which works with the Microsoft control and fails with our grid. Once assembled, you can send the sample via regular support ticket. I will debug it locally and will get around to you with our findings.

    Best regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  9. chad
    chad avatar
    3 posts
    Member since:
    Mar 2016

    Posted 07 Mar Link to this post

    My delete still not working. Inserting and editing working but deleting not working. It throws error "Must declare the scalar variable "@ID". Please find my below code and try to help me. I even DataKeyNames="ID" but st

     

     

     

     

     

     

     

     

     

     

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HPPRawData.aspx.cs" Inherits="HPPDemo.HPPRawData" %>

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <!DOCTYPE html>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadGrid ID="RadGrid1" AutoGenerateColumns="False"
                AllowPaging="True" runat="server" OnItemDataBound="OnItemDataBoundHandler"
                DataSourceID="SqlDataSource1" FilterType="HeaderContext" EnableHeaderContextFilterMenu="True" EnableHeaderContextMenu="True" DataKeyNames="ID"
                ShowStatusBar="True" GroupPanelPosition="Top" CellSpacing="-1" GridLines="Both" AllowSorting="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True">
                <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>

                <MasterTableView ShowFooter="false" EditMode="InPlace" CommandItemDisplay="TopAndBottom" DataSourceID="SqlDataSource1">
                    <Columns>
                        <telerik:GridBoundColumn DataField="Year" DataType="System.Int32" FilterControlAltText="Filter Year column" HeaderText="Year" SortExpression="Year" UniqueName="Year">
                        </telerik:GridBoundColumn>

                        <telerik:GridTemplateColumn UniqueName="WeekEnding" HeaderText="WeekEnding"
                            ItemStyle-Width="400px">
                            <ItemTemplate>
                                <%#DataBinder.Eval(Container.DataItem, "WeekEnding")%>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadDatePicker ID="picker1" runat="server" DbSelectedDate='<%# Bind("WeekEnding") %>'
                                    AutoPostBack="True" DefaultInsertValue="Today" Culture="Swedish (Sweden)">
                                </telerik:RadDatePicker>
                            </EditItemTemplate>
                            <ItemStyle Width="400px"></ItemStyle>
                        </telerik:GridTemplateColumn>

                        <telerik:GridTemplateColumn UniqueName="RunDate" HeaderText="RunDate"
                            ItemStyle-Width="400px">
                            <ItemTemplate>
                                <%#DataBinder.Eval(Container.DataItem, "RunDate")%>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadDatePicker ID="picker2" runat="server" DbSelectedDate='<%# Bind("RunDate") %>'
                                    AutoPostBack="True" DefaultInsertValue="Today" Culture="Swedish (Sweden)">
                                </telerik:RadDatePicker>
                            </EditItemTemplate>
                            <ItemStyle Width="400px"></ItemStyle>
                        </telerik:GridTemplateColumn>




                        <telerik:GridTemplateColumn UniqueName="SKU" HeaderText="Supplier" SortExpression="SKU"
                            ItemStyle-Width="400px">
                            <FooterTemplate>
                                Template footer
                            </FooterTemplate>
                            <FooterStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                            <ItemTemplate>
                                <%#DataBinder.Eval(Container.DataItem, "SKU")%>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadComboBox runat="server" ID="RadComboBox1" EnableLoadOnDemand="True" DataTextField="Item_Name"
                                    OnItemsRequested="RadComboBoxProduct_ItemsRequested" DataValueField="SKU" AutoPostBack="true"
                                    HighlightTemplatedItems="true" Height="140px" Width="220px" DropDownWidth="420px" Filter="StartsWith"
                                    DataSourceID="SqlDataSource1" SelectedValue='<%#Bind("SKU") %>'
                                    OnSelectedIndexChanged="OnSelectedIndexChangedHandler">
                                </telerik:RadComboBox>

                            </EditItemTemplate>

                            <ItemStyle Width="400px"></ItemStyle>
                        </telerik:GridTemplateColumn>

                        <telerik:GridTemplateColumn UniqueName="ExpirationDate" HeaderText="ExpirationDate"
                            ItemStyle-Width="400px">
                            <ItemTemplate>
                                <%#DataBinder.Eval(Container.DataItem, "ExpirationDate")%>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadDatePicker ID="picker3" runat="server" DbSelectedDate='<%# Bind("ExpirationDate") %>'
                                    AutoPostBack="True" DefaultInsertValue="Today" Culture="Swedish (Sweden)">
                                </telerik:RadDatePicker>
                            </EditItemTemplate>
                            <ItemStyle Width="400px"></ItemStyle>
                        </telerik:GridTemplateColumn>


                        <telerik:GridBoundColumn DataField="UnitsProduced" DataType="System.Int32" FilterControlAltText="Filter UnitsProduced column" HeaderText="UnitsProduced" SortExpression="UnitsProduced" UniqueName="UnitsProduced">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="PackagesPerCase" DataType="System.Int32" FilterControlAltText="Filter PackagesPerCase column" HeaderText="PackagesPerCase" SortExpression="PackagesPerCase" UniqueName="PackagesPerCase">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="TotalPackages" DataType="System.Int32" FilterControlAltText="Filter TotalPackages column" HeaderText="TotalPackages" SortExpression="TotalPackages" UniqueName="TotalPackages">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Pre_HPPLeaker_LoosePackaging" DataType="System.Int32" FilterControlAltText="Filter Pre_HPPLeaker_LoosePackaging column" HeaderText="Pre_HPPLeaker_LoosePackaging" SortExpression="Pre_HPPLeaker_LoosePackaging" UniqueName="Pre_HPPLeaker_LoosePackaging">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Post_HPP_Leaker_LoosePackaging" FilterControlAltText="Filter Post_HPP_Leaker_LoosePackaging column" HeaderText="Post_HPP_Leaker_LoosePackaging" SortExpression="Post_HPP_Leaker_LoosePackaging" UniqueName="Post_HPP_Leaker_LoosePackaging" DataType="System.Int32">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="LineageLot" FilterControlAltText="Filter LineageLot column" HeaderText="LineageLot" SortExpression="LineageLot" UniqueName="LineageLot" DataType="System.Int32">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="LotCode3" FilterControlAltText="Filter LotCode3 column" HeaderText="LotCode3" SortExpression="LotCode3" UniqueName="LotCode3">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="F13" FilterControlAltText="Filter F13 column" HeaderText="F13" SortExpression="F13" UniqueName="F13">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="F14" FilterControlAltText="Filter F14 column" HeaderText="F14" SortExpression="F14" UniqueName="F14">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="F15" FilterControlAltText="Filter F15 column" HeaderText="F15" SortExpression="F15" UniqueName="F15">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="F16" FilterControlAltText="Filter F16 column" HeaderText="F16" SortExpression="F16" UniqueName="F16">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="F17" FilterControlAltText="Filter F17 column" HeaderText="F17" SortExpression="F17" UniqueName="F17">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Item_Name" Display="false" FilterControlAltText="Filter Item_Name column" HeaderText="Item_Name" SortExpression="Item_Name" UniqueName="Item_Name">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ID" Display="true" FilterControlAltText="Filter ID column" HeaderText="ID" SortExpression="ID" UniqueName="ID">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:StagingConnectionString %>"
                SelectCommand="SELECT * FROM [dbo].[vw_HPPRow]"
                DeleteCommand="DELETE FROM [HPP_RAW_DATA] WHERE [ID] = @ID"
                InsertCommand="INSERT INTO [HPP_RAW_DATA] ( 
           [Year]
          ,[WeekEnding]
          ,[RunDate]
          ,[SKU]
          ,[ExpirationDate]
          ,[UnitsProduced]
          ,[PackagesPerCase]
          ,[TotalPackages]
          ,[Pre_HPPLeaker_LoosePackaging]
          ,[Post_HPP_Leaker_LoosePackaging]
          ,[LineageLot]
          ,[LotCode3]
          ,[F13]
          ,[F14]
          ,[F15]
          ,[F16]
          ,[F17]) 
                VALUES (
           @Year
          ,@WeekEnding
          ,@RunDate
          ,@SKU
          ,@ExpirationDate
          ,@UnitsProduced
          ,@PackagesPerCase
          ,@TotalPackages
          ,@Pre_HPPLeaker_LoosePackaging
          ,@Post_HPP_Leaker_LoosePackaging
          ,@LineageLot
          ,@LotCode3
          ,@F13
          ,@F14
          ,@F15
          ,@F16
          ,@F17)"
                UpdateCommand="UPDATE  [HPP_RAW_DATA] 
    SET
           [Year]=@Year
          ,[WeekEnding]=@WeekEnding
          ,[RunDate]=@RunDate
          ,[SKU]=@SKU
          ,[ExpirationDate]=@ExpirationDate
          ,[UnitsProduced]=@UnitsProduced
          ,[PackagesPerCase]=@PackagesPerCase
          ,[TotalPackages]=@TotalPackages
          ,[Pre_HPPLeaker_LoosePackaging]=@Pre_HPPLeaker_LoosePackaging
          ,[Post_HPP_Leaker_LoosePackaging]=@Post_HPP_Leaker_LoosePackaging
          ,[LineageLot]=@LineageLot
          ,[LotCode3]=@LotCode3
          ,[F13]=@F13
          ,[F14]=@F14
          ,[F15]=@F15
          ,[F16]=@F16
          ,[F17]=@F17
                WHERE [Id] = @ID">
                <DeleteParameters>
                    <asp:Parameter Name="ID" Type="String" />
                </DeleteParameters>
                <InsertParameters>
                    <asp:Parameter Name="Year" Type="String" />
                    <asp:Parameter Name="WeekEnding" Type="String" />
                    <asp:Parameter Name="RunDate" Type="String" />
                    <asp:Parameter Name="SKU" Type="String" />
                    <asp:Parameter Name="ExpirationDate" Type="String" />
                    <asp:Parameter Name="UnitsProduced" Type="String" />
                    <asp:Parameter Name="PackagesPerCase" Type="String" />
                    <asp:Parameter Name="TotalPackages" Type="String" />
                    <asp:Parameter Name="Pre_HPPLeaker_LoosePackaging" Type="String" />
                    <asp:Parameter Name="Post_HPP_Leaker_LoosePackaging" Type="String" />
                    <asp:Parameter Name="LineageLot" Type="String" />
                    <asp:Parameter Name="LotCode3" Type="String" />
                    <asp:Parameter Name="F13" Type="String" />
                    <asp:Parameter Name="F14" Type="String" />
                    <asp:Parameter Name="F15" Type="String" />
                    <asp:Parameter Name="F16" Type="String" />
                    <asp:Parameter Name="F17" Type="String" />
                </InsertParameters>
                <UpdateParameters>
                    <asp:Parameter Name="Year" Type="String" />
                    <asp:Parameter Name="WeekEnding" Type="String" />
                    <asp:Parameter Name="RunDate" Type="String" />
                    <asp:Parameter Name="SKU" Type="String" />
                    <asp:Parameter Name="ExpirationDate" Type="String" />
                    <asp:Parameter Name="UnitsProduced" Type="String" />
                    <asp:Parameter Name="PackagesPerCase" Type="String" />
                    <asp:Parameter Name="TotalPackages" Type="String" />
                    <asp:Parameter Name="Pre_HPPLeaker_LoosePackaging" />
                    <asp:Parameter Name="Post_HPP_Leaker_LoosePackaging" Type="String" />
                    <asp:Parameter Name="LineageLot" Type="String" />
                    <asp:Parameter Name="LotCode3" Type="String" />
                    <asp:Parameter Name="F13" Type="String" />
                    <asp:Parameter Name="F14" Type="String" />
                    <asp:Parameter Name="F15" Type="String" />
                    <asp:Parameter Name="F16" Type="String" />
                    <asp:Parameter Name="F17" Type="String" />
                    <asp:Parameter Name="ID" Type="String" />

                </UpdateParameters>

            </asp:SqlDataSource>
        </form>
    </body>
    </html>

     

  10. Eyup
    Admin
    Eyup avatar
    3007 posts

    Posted 09 Mar Link to this post

    Hello Chad,

    The UpdateCommand, which you stated that is working as expected, ends with the following:
    WHERE [Id] = @ID

    This means that the field in your database is called Id not ID. Please make the suggested change in the DeleteCommand as well and let me know if this resolves the issue.

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  11. chad
    chad avatar
    3 posts
    Member since:
    Mar 2016

    Posted 09 Mar in reply to Eyup Link to this post

    Thank you so much for your quick turnaround!! it did work. You guys are the best :)
  12. Eyup
    Admin
    Eyup avatar
    3007 posts

    Posted 11 Mar Link to this post

    Hi Chad,

    I'm glad that the provided solution has resolved the issue. I would like to note that according to our records you don’t hold any purchased Telerik licenses. If you are working for a company, please contact the licensed holder of the company and ask him to add you as a licensed user. This can be done using the account of the holder under "Manage products >> Manage licensed users".

    Please go ahead and check our Support plans. They can provide you with faster and priority support options for your production cases:
    http://www.telerik.com/purchase/support-plans/devtools

    We will be glad to hear from you:
    http://www.telerik.com/contact

    Regards,
    Eyup
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017