CodeIgniter Forums
sqlsrv/pdo massive update fails - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: sqlsrv/pdo massive update fails (/showthread.php?tid=64628)



sqlsrv/pdo massive update fails - dimas - 03-14-2016

Hi,

I'm using CI 3.0.5 with a SQL Server 2008 database and the sqlsrv driver. When I try to execute from a CI model some write query affecting many rows to a specific table it doesn't do nothing.

Examples:
- $this->db->insert_batch('GT_CalendariProfessional', $data); where $data have arround 200 rows.
- $this->db->where_in("CalendariProfessionalId", $ids)->update("GT_CalendariProfessional", array($data); where $ids have arround 200 rows.

If I output the generated SQL (last_query()) and execute this directly to the database it works as expected.

Some background:
- The table have a trigger. If I disable the trigger the SQL works again.
- The same happened with CI 3.0.3
- The same happens using pdo driver.

Is it a bug?