CodeIgniter Forums
Critical ODBC driver bug - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Critical ODBC driver bug (/thread-11519.html)



Critical ODBC driver bug - El Forum - 09-11-2008

[eluser]Jonathon Hill[/eluser]
There is a critical bug in /database/drivers/odbc/odbc_driver.php, causing this error when we try to run a query using $this->db->query($sql):

Code:
Fatal error: Call to a member function num_rows() on a non-object in [BASEPATH]/database/drivers/odbc/odbc_driver.php on line 287

This bug is present in at least CI 1.6.1 and 1.6.3. Here's the easy fix:

Code:
function CI_DB_odbc_driver($params)
{
    parent::CI_DB($params);
    $this->_random_keyword = ' RND('.time().')'; // database specific random keyword
}



Critical ODBC driver bug - El Forum - 10-16-2008

[eluser]Mr. Ed[/eluser]
Can someone from CI Team have a look on this?

I had a problem connecting to a MS Access db because the function CI_DB_odbc_driver() wasn't taking the params from the database.php config file. I solved it by applying Jonathon fix.


Critical ODBC driver bug - El Forum - 10-16-2008

[eluser]Rick Ellis[/eluser]
This has been fixed in SVN. You need to replace all the files in "database", as they've undergone some revisions over the past couple days.


Critical ODBC driver bug - El Forum - 10-16-2008

[eluser]Jonathon Hill[/eluser]
When are you guys going to publish another version of CI on the website? And how is EE2.0 coming?


Critical ODBC driver bug - El Forum - 10-16-2008

[eluser]Rick Ellis[/eluser]
We're clearing out the bug tracker at the moment, so we should have a CI release ready next week.


Critical ODBC driver bug - El Forum - 10-17-2008

[eluser]Mr. Ed[/eluser]
Thanks Rick!

I'll get those files.

I'll be waiting for that CI reales.