CodeIgniter Forums
Database Library - ODBC not working in CI 3.1.3 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: Database Library - ODBC not working in CI 3.1.3 (/showthread.php?tid=67484)



Database Library - ODBC not working in CI 3.1.3 - nikku - 02-27-2017

Hi Guys!

I'm trying to use the ODBC drive of CI to connect to DB2.
And I can connect successfully, however the problem is I can't use the Active Record.
I've tried switching to MySQL, and it's working ok.

using MySQL:
C:\...\application\core\My_Model.php:261Confusedtring 'CI_DB_mysqli_driver' (length=19)
C:\...\application\controllers\Test.php:9:
object(My_UserAccount)[27]
 public 'username' => string 'test' (length=3)
 public 'password' => string '$2y$10$zu5s2w9SGmmDghFlMblV2.1OZuH7eVExb8xI7dd9Awp3J71RhI8nm' (length=60)
 public 'email' => string 'test@abc.com' (length=24)
 public 'reg_date' => string '2017-02-02 12:08:33' (length=19)
 public 'last_login' => string '2017-02-02 12:08:34' (length=19)
 public 'is_admin' => string '1' (length=1)
 public '_data' =>
   array (size=0)


using ODBC:
C:\...\application\core\My_Model.php:261Confusedtring 'CI_DB_odbc_driver' [i](length=17)

An uncaught Exception was encountered
Type: Error
Message: Call to undefined method CI_DB_odbc_driver::get_where()
[/i]


Can you help me fix this problem?
Thank you in advance.


RE: Database Library - ODBC not working in CI 3.1.3 - ciadmin - 02-27-2017

The query builder cannot be used with the ODBC driver. See https://forum.codeigniter.com/thread-65803.html