Welcome Guest, Not a member yet? Register   Sign In
IBM DB2 full support with active records
#1

Hai,
I am using codeigniter 2.2.1 with "IBM DB2" database. I think the database driver which I am using is a custom design by "dev team". It didn't support active records. Is there any fully functional package available in codeigniter for "IBM DB2" ? kindly help is there is one available. Thank you in advance
Reply
#2

we are using php with IBM DB2 .Now we are redesigning the code in Codeigniter 2.2.1
but we cant find any supporting driver file for IBM DB2 .Please help.
Curious to know that whether DB2 is supported by codeigniter Active records??
Reply
#3

Upgrade to CI3 (3.0RC3). It supports it out of the box via PDO.
Reply
#4

This sure looks like a duplicate of the one from arunsankars1989 in this forum.
Are these unique issues?
Reply
#5

(This post was last modified: 03-25-2015, 11:01 PM by arunsankars1989. Edit Reason: made it more meaningfull )

(03-25-2015, 08:56 AM)Narf Wrote: Upgrade to CI3 (3.0RC3). It supports it out of the box via PDO.

Thank you for the reply...
So what I have to give as the "$db['default']['dbdriver']" in the 'database.php'?
Reply
#6

Please help .I googled but failed .I wonder nobody using DB2 + Codeigniter Huh Huh Huh
Reply
#7

PHP Code:
$db['default']['dbdriver'] = 'pdo' 

Also make a valid dsn string. Something like this I guess:
PHP Code:
$db['default']['dsn'] = 'ibm:host=localhost;port=5432;dbname=database_name'
Reply
#8

(03-25-2015, 07:16 PM)ciadmin Wrote: This sure looks like a duplicate of the one from arunsankars1989 in this forum.
Are these unique issues?

They're not, I reported the other one as a duplicate.
Reply
#9

(This post was last modified: 03-26-2015, 04:43 AM by arunsankars1989.)

(03-26-2015, 01:35 AM)Sharasuke Wrote:
PHP Code:
$db['default']['dbdriver'] = 'pdo' 

Also make a valid dsn string. Something like this I guess:

PHP Code:
$db['default']['dsn'] = 'ibm:host=localhost;port=5432;dbname=database_name'

I tried this one. But this didn't help. it shows the error

"could not find driver

Filename: core/Loader.php

Line Number: 305"
Reply
#10

(This post was last modified: 03-26-2015, 07:03 AM by frocco.)

Here is what I have
$system = 'your system';
Code:
$db['default'] = array(
    'dsn'    => 'odbc:DRIVER={iSeries Access ODBC Driver};SYSTEM=$system;PROTOCOL=TCPIP',
    'hostname' => 'localhost',
    'username' => 'user',
    'password' => 'password',
    'database' => 'FARWRK.VIS',
    'dbdriver' => 'pdo',

to test
$query = $this->db->query('select * from farwrk.vis');
Reply




Theme © iAndrew 2016 - Forum software by © MyBB