Stored procedure does not run completely when I call it from PHP

3

I'm having a very serious problem because it does not let me continue with the project I'm developing.

The logic is as follows, I upload a file of Excel to the server (from a web system) then I read the data that is in the file of Excel and I generate a XML , that XML I send it to a stored procedure in SQL Server 2008 . I check with SQL Server Profiler that the call is being made to the stored procedure and everything is correct up there.

As in my SP I have a transaction then it does not insert anything in the database of what I send it in XML . If I comment on the transaction, only half of what I send in XML is saved.

If I directly execute the SP from SQL Server and send the same XML , everything is saved without any problem.

Does anyone know what is happening and how can I solve this problem?

In advance, thank you very much.

    
asked by Juan Carlos Rocafuerte 22.04.2016 в 16:11
source

1 answer

1

I discovered that the problem was because I had not activated the set nocount on .
I put the set nocount on at the beginning of the transaction and at the end set nocount off and it worked wonders. Thank you all

    
answered by 22.04.2016 в 18:31