UpdateCommand on sql resource

3 posts, 0 answers
  1. Aaron
    Aaron avatar
    2 posts
    Member since:
    Feb 2013

    Posted 14 Mar 2013 Link to this post

    Hi guys

    I'm using a sqlserver view to bring up my fields. My update command however has errors when I try it

    This is the resource:
    <asp:SqlDataSource ID="SQLLucas" runat="server" ConnectionString="<%$ ConnectionStrings:DatabaseAutoSMSDiary1 %>" SelectCommand="SELECT * FROM [vwBookingsDetails]" UpdateCommand="UPDATE [Bookings] SET [Start Time] = @Start, [End Time] = @End1, [Booking Date] = @BookingDate WHERE [Booking ID] = @ID1">                    
                    <asp:Parameter Name="Start" Type="DateTime"></asp:Parameter>
                    <asp:Parameter Name="End1" Type="DateTime"></asp:Parameter>
                    <asp:Parameter Name="BookingDate" Type="DateTime"></asp:Parameter>
                    <asp:Parameter Name="ID1" Type="Int32"></asp:Parameter>

    This is my error coming from js function appointmentMoveEnd:

    Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Incorrect syntax near 'nvarchar'.
    Incorrect syntax near 'datetime'.
    Line 9

  2. Plamen
    Plamen avatar
    3080 posts

    Posted 19 Mar 2013 Link to this post

    Hi Aaron,

    It is not quite clear what is not working properly from the code provided but you can refer to this on-line demo where similar behavior is implemented.

    I am also attaching a sample web page where RadScheduler is bound similarly.

    Hope this will be helpful.

    All the best,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Aaron
    Aaron avatar
    2 posts
    Member since:
    Feb 2013

    Posted 23 Mar 2013 Link to this post


    I still cannot see why this won't work. I cannot add a file here so I have attached a link to my project on my server.
    Please check the file in bookings/bookings.aspx for the telerik scheduler with the update issue. SQL database is also in the file that it is running off.


Back to Top