douyin8809 2013-07-24 18:24
浏览 208
已采纳

PDO_ODBC:未找到数据源名称且未指定默认驱动程序

I'm trying to access an ODBC connection in PHP via PDO_ODBC. This is my code:

$db = new PDO('odbc:MyDSN', '', '');

And I'm getting this error:

SQLSTATE[IM002] SQLConnect: 0 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I know the DSN is working because I can use it in Python with pyodbc. The type is User DSN - does it need to be a System DSN? I'm not specifying a driver because I figured ODBC was abstracting that away, but maybe I need to? The underlying DB is Oracle, if that helps.

Thank you!

  • 写回答

1条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥100 c/c++实现DoubleArrayTrie
      • ¥30 关于#网络安全#的问题:非对称加密验证
      • ¥20 关于线性代数里施密特正交化和QR分解的疑问
      • ¥15 matlab超类包含解析错误
      • ¥15 python拖拽文件问题
      • ¥15 执行import paddle代码出现错误如何解决?
      • ¥15 hisat2align exited with value 137
      • ¥15 寻找大学生合作开发软件(Delphi)
      • ¥30 AndroidBench&eMMC内存测试速度&Android
      • ¥15 W10 文件共享失败 怎么解决