简体   繁体   中英

YII, MS Access how can i use it together?

I want use Yii and MS Access together, but I don't know how..
I can use ODBC without Yii like this

$link = odbc_connect($name, $user, $pass)

but now i need it in Yii, like MySQL:

'db'=>array(
        'connectionString' => 'mysql:host=localhost;dbname=ex1c',
        'emulatePrepare' => true,
        'username' => 'root',
        'password' => '',
        'charset' => 'utf8',
        'tablePrefix' => 'ex1c_',
    )

what should i write in connection string
may be need something software setup in computer
how to set it?

If I'm understanding your question right, you have one set of data that you want to be able to reference from a YII application and from MS Access. The best approach I can think of here is to:

  1. Put the data into a MySQL database
  2. Have YII access it directly as you illustrate above
  3. Set up the MySQL ODBC driver on the Windows machine where you are running access, and point Access at MySQL via that driver

Here is a pointer to MyODBC, which will provide the critical linkage between Access and MySQL:

http://dev.mysql.com/downloads/connector/odbc/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM