YII, MS Access 如何一起使用? [英] YII, MS Access how can i use it together?
问题描述
我想同时使用 Yii 和 MS Access,但我不知道如何..
我可以像这样在没有 Yii 的情况下使用 ODBC
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)
但现在我在 Yii 中需要它,比如 MySQL:
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?
推荐答案
如果我理解您的问题是正确的,那么您希望能够从 YII 应用程序和 MS Access 中引用一组数据.我能想到的最好方法是:
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:
- 将数据放入MySQL数据库
- 让 YII 直接访问它,如上图所示
- 在您运行访问的 Windows 机器上设置 MySQL ODBC 驱动程序,并通过该驱动程序将访问指向 MySQL
这是一个指向 MyODBC 的指针,它将提供 Access 和 MySQL 之间的关键链接:
Here is a pointer to MyODBC, which will provide the critical linkage between Access and MySQL:
http://dev.mysql.com/downloads/connector/odbc/
这篇关于YII, MS Access 如何一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!