CodeIgniter Forums
Bug or not.... A Database Error Occurred no error number only sql query?? - 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: Bug or not.... A Database Error Occurred no error number only sql query?? (/thread-9128.html)



Bug or not.... A Database Error Occurred no error number only sql query?? - El Forum - 06-13-2008

[eluser]Unknown[/eluser]
A Database Error Occurred
Error Number:

SELECT * FROM "test"
--------------------------------------------

Hello I am very new to codeigniter.
I wanted to test it with mssql database.

Above is the error I get.
Is this a bug or where should I search for solving the error.
Any tips..

-->I changed autoload.php
$autoload['libraries'] = array('database');
-->This is my database.php
$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "R5";
$db['default']['password'] = "rayrayrayr5";
$db['default']['database'] = "R5_php_dev";
$db['default']['dbdriver'] = "mssql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

--> the code
model
...

function get_last_ten_entries()
{
$query = $this->db->get('test');
return $query->result();
}
...
controller
...
$this->load->model('Blog_model');

$data['query'] = $this->Blog_model->get_last_ten_entries();

$this->load->view('blogview', $date);
...

I found on google only something that it was a bug..
Probably I just make a beginners mistake.
But I can not figure this out.....

Ah just tried the sollution
http://ellislab.com/forums/viewthread/71558/#353513
But could not get it working.
I am using mssqlserver 2000


Many thanks

Raymond Marx
RayIT