[Is there anyone who can enlighten me?] The stored procedure of calling SQL server by PHP does not return the result set and no error is reported.
程序小学生
程序小学生 2023-06-30 17:53:05
0
0
435

I encountered a very strange problem when I was working on a project today. When I used PHP's sqlsrv to call the stored procedure of sql server, no error was reported, and no result set was returned.

微信图片_20230630174600.png

My var_dump comes out as null

微信图片_20230630174702.png

But when executing the statement in sql server 2008, there is data

微信图片_20230630173911.png

So I searched for information on the Internet for a long time and found a person who does java. He said this

微信图片_20230630174053.png

So I tried it and changed the sql statement to

微信图片_20230630174819.png

I didn’t expect it to be possible

微信图片_20230630174937.png

I thought it was solved when I could get the result set

As a result, I changed a machine, put the program in and ran it, but it didn’t work again. It didn’t work whether I added SET NOCOUNT ON in front or not. If I changed it to another select SQL statement, it would be fine. But the stored procedure wouldn’t work. I was at a loss. , see if anyone can give me some advice

程序小学生
程序小学生

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template