This is a migrated thread and some comments may be shown as answers.

Stored Procedure don't work

2 Answers 25 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sandr
Top achievements
Rank 1
Sandr asked on 29 Jun 2015, 08:55 PM

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 Answers, 1 is accepted

Sort by
0
Doroteya
Telerik team
answered on 30 Jun 2015, 05:49 AM
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.
0
Sandr
Top achievements
Rank 1
answered on 01 Jul 2015, 06:54 PM

Wonderfull. It's  wor.

Thanks Doroteya

Tags
General Discussions
Asked by
Sandr
Top achievements
Rank 1
Answers by
Doroteya
Telerik team
Sandr
Top achievements
Rank 1
Share this question
or