Stored Procedure don't work

3 posts, 0 answers
  1. Sandr
    Sandr avatar
    4 posts
    Member since:
    Dec 2014

    Posted 29 Jun 2015 Link to this post

    Hello,

    I try to call a stored procedure to insert data into a database.
    When I call the stored procedure through Telerik Data Access, the insertion is never performed.

    Trace with SQL Server Profiler

    RPC:Completed => exec [dbo].[CreatePerson] @CivilityId=2,@FirstName=N'Sandro',@LastName=N'00000000-0000-0000-0000-000000000000',@BirthDate='2015-06-29 22:03:30.287',@ProfessionId=1,@MobilePhone=N'06-01-18-12-18',@EmailAddress=N'tape@ici.com',@Password=N'2usaoT3IHoOkOjilIT/8RQ==',@Culture=N'fr-FR'

    When I call the stored procedure directly from Microsoft SQL Server Management Studio with the same parameters, the insertion is done well.
    I note that the id placed in auto-increment jumped a notch (so on inserting missed telerik).

     

    What's wrong ?

    thank you in advance

     

    Sandra

  2. Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 30 Jun 2015 Link to this post

    Hello Sandra,

    The reason for the behaviour you are experiencing is that by default, Telerik Data Access does not commit to the database the changes performed through stored procedures. To do so, you need to call the SaveChanges method of the context after the call to the stored procedure. Here you can find more details on the topic.

    I hope this helps. Let me know, if you need further information.


    Regards,
    Doroteya
    Telerik
     
    Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
  3. DevCraft banner
  4. Sandr
    Sandr avatar
    4 posts
    Member since:
    Dec 2014

    Posted 01 Jul 2015 in reply to Doroteya Link to this post

    Wonderfull. It's  wor.

    Thanks Doroteya

Back to Top