Welcome Guest, Not a member yet? Register   Sign In
Execute MSSQL Stored Procedure
#1

Hello I have a problem to exec stored procedure of MSSQL use CodeIgniter. 

While i use $this->db->query("EXEC SP_NAME")->result();
also return an empty array.

 But in this case if I exec in Management Studio with this command also return data.

 Please help me if you know because its important.
 Thank You.
Reply
#2

(08-24-2017, 06:52 PM)wahdicandras Wrote: Hello I have a problem to exec stored procedure of MSSQL use CodeIgniter. 

While i use $this->db->query("EXEC SP_NAME")->result();
also return an empty array.

 But in this case if I exec in Management Studio with this command also return data.

 Please help me if you know because its important.
 Thank You.

Hi wahdicandras,
looks like you forgot to add brackets "()". Please see the below code. hope it will work.
[/url]$query = $this->db->query("call SP_NAME()");
return $query->result_array();
[url=https://forum.codeigniter.com/user-13923.html]


Thank you,
Raja
Reply




Theme © iAndrew 2016 - Forum software by © MyBB