laravel - SQLSTATE[IM002] SQLDriverConnect: 0 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in Laravel
问题描述
安装后composer require moodlesbv/laravel-msaccess
并按照有关如何设置连接的说明进行操作。我已经下载了accessdatabaseengine_X64
,并且已经在 ODBC 数据源 (x64) 中设置了数据源,但是我收到了这个错误。
Laravel 6,PHP 7.4
exception: "Doctrine\DBAL\Driver\PDO\Exception"
file: "C:\xampp\htdocs\hris_mirdc\hris\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDO\Exception.php"
line: 18
message: "SQLSTATE[IM002] SQLDriverConnect: 0 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
database.php配置文件
'connections' => [
'access' => [
'driver' => 'pdo_access',
'connection_string' => 'dsn={UNIS}',
'username' => 'unisuser',
'password' => 'unisamho',
'table_prefix' => '',
]
],
解决方案
推荐阅读
- kernel - macOS 如何验证我的软件是否经过公证?
- r - 根据标签重塑列表
- excel - PMT公式计算减少多少贷款金额的公式
- java - saxon-xpath-9.1.0.8.jar!/META-INF/services/javax.xml.xpath.XPathFactory:2:非法配置文件语法
- javascript - 构造函数第二次失败,但不是第一次
- python - 斯坦福在 python 中使用 coreNLP 键入依赖项
- javascript - 更改属性时如何抛出错误?
- mysql - 将两列之间的时间差计算为表中的另一列 AFTER\BEFORE INSERT
- python-2.7 - 在 def 函数中调用 Dataframe()
- stm32 - STM32 SPI 带宽评估程序