Welcome Guest, Not a member yet? Register   Sign In
Limited Result using ODBC driver
#1

Hi Masters,


Does anyone of you know the reason why I'm only getting 92 rows instead of 19,000+ rows to be fetched from Hana database.

Here's my database configuration:

$db['hana_db'] = array(
    'dsn' => "",
    'hostname' => "Driver={HDBODBC32};ServerNode=192.168.0.***:3***5;UID=Admin;PWD=******;",
    'username' => '',
    'password' => '',
    'database' => '',
    'dbdriver' => 'odbc',
    'dbprefix' => '',
    'pconnect' => TRUE,
    'db_debug' => TRUE,
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci'
);


Thanks in advance.
Reply
#2

Show us "SELECT" query by which you are fetching the records from database.

You have just provided database connection array.
Reply
#3

(08-18-2016, 12:24 AM)pravins Wrote: Show us "SELECT" query by which you are fetching the records from database.

You have just provided database connection array.

Hi pravins,

Here's the Model function where I am fetching the records.

    function getRecords()
     {
               
        $saphana_db = $this->load->database('hana_db', true);
        $query  = $saphana_db->query("SELECT AUART, AUFNR, KTEXT, BUKRS FROM AUFK WHERE MANDT = 800 AND KTEXT <> '' ORDER                                                                        BY BUKRS DESC");   
        return $query->result();
     }


 Fetching lower than 92 records is okay.
Reply
#4

(08-18-2016, 12:34 AM)wacky_dandoy Wrote:
(08-18-2016, 12:24 AM)pravins Wrote: Show us "SELECT" query by which you are fetching the records from database.

You have just provided database connection array.

Hi pravins,

Here's the Model function where I am fetching the records.

    function getRecords()
     {
               
        $saphana_db = $this->load->database('hana_db', true);
        $query  = $saphana_db->query("SELECT AUART, AUFNR, KTEXT, BUKRS FROM AUFK WHERE MANDT = 800 AND KTEXT <> '' ORDER                                                                        BY BUKRS DESC");   
        return $query->result();
     }


 Fetching lower than 92 records is okay.

have you executed the query at database level, please check the result.

your WHERE condition may be providing the filtered data(92 rows instead of 19,000+)

also check "SELECT AUART, AUFNR, KTEXT, BUKRS FROM AUFK ORDER BY BUKRS DESC" query, does you get all records in table
Reply




Theme © iAndrew 2016 - Forum software by © MyBB