• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connection to Access

#1
Hi Coders,


any body can help, how to connect CI.3 to access 97
Reply

#2
I haven't used access for storage with CI.
How ever you should be able to use ODBC

And with little search I found this 2 threads perhaps they may help you:
https://ellislab.com/forums/viewthread/93160/
http://stackoverflow.com/questions/17886...or-cakephp
Best VPS Hosting : Digital Ocean
Reply

#3
You have to use the odbc driver. Try for the database setting string like that with your DNS name created in you windows settings:

PHP Code:
$db['default'] = array(
        ...
    
'hostname' => 'Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\path\to\my.mdb'// or try only the DNS name
    
'username' => 'dbusername',
    
'password' => 'dbpassword',
    
'database' => 'Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\path\to\my.mdb',
    
'dbdriver' => 'odbc',
        ...
); 

Hope this helps.

Reply

#4
Hi coders, Thanks to your help.

I try all your suggestion but i gut this error,

PHP Code:
  SeverityWarning

Message
odbc_pconnect(): SQL error: [Microsoft][ODBC Driver ManagerData source name not found and no default driver specifiedSQL state IM002 in SQLConnect

Filename
odbc/odbc_driver.php

Line Number
124 
Reply

#5
hi any body can help...

i try code below but still not work and i gut error below:

A Database Error Occurred

Unable to connect to your database server using the provided settings.
Filename: C:\wamp\www\octaon_ocs\system\database\DB_driver.php
Line Number: 124

PHP Code:
$active_group 'default';
$active_record TRUE;

$db['default']['hostname'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\recent.mdb';
$db['default']['username'] = '';
$db['default']['password'] = '';
$db['default']['database'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\recent.mdb';
$db['default']['dbdriver'] = 'odbc';
$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';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE
Reply

#6
any help..
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.