In my CI application setup to query a mssql database. I want to execute a stored procedure from active record. But I
If you are using later versions of codeigniter with mssql or sqlsrv with stored procedures, using 'CALL' as in query('CALL procedureName($param1,$params,....)') may not work.
In the case of MSSQL use:
$this->db->query('EXEC procedureName')
OR
$this->db->query('EXEC procedureName $param1 $param2 $param3,...')
In some cases you might need to turn on some constants for the driver. In this case run:
$this->db->query('Set MSSQL constant ON )
before running your regular query.