PostgreSQL ODBC驱动程序抛出错误 [英] PostgreSQL ODBC driver throws error

查看:544
本文介绍了PostgreSQL ODBC驱动程序抛出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在WPF中创建了一个使用postgres数据库的应用程序。这在本地工作正常。



我试图将二进制文件上传到另一台机器,安装了ODBC驱动程序,三重检查了我在互联网上找到的所有内容,但我可以让它工作:



I made an application in WPF that uses a postgres database. This is working fine locally.

I tried to upload the binaries to another machine, installed the ODBC driver, triple checked everything I could find on the internet, but I can't get it to work:

[ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified]





我检查了注册表,我使用的是64位机器和64位驱动程序(psqlodbc_09_03_0300-x64 -1)我检查了连接字符串。我在注册表中验证了驱动程序名称。



我通过ODBC(数据源)建立连接并测试与参数的连接。没问题。 PgAdmin III工作正常。



唯一的区别是我的本地机器有postgres 9.1和远程机器postgres 9.4。 (虽然他们去的是9.1的同一台服务器)



如果有人有想法,请分享。

谢谢。



[求助]

去图,驱动程序名称应该是{PostgreSQL UNICODE}而不是PostgreSQL Unicode(x64)尽管注册表告诉我其他的东西。我回到基础并使用了connectiontrings.com并尝试了。

[/已解决]



I checked the registry, I'm using a 64 bit machine and a 64 bit driver (psqlodbc_09_03_0300-x64-1) and I checked the connectionstring. I verified the driver name in the registry.

I setup a connection through ODBC (Data Sources) and tested the connection with the parameters. No problem there. PgAdmin III is also working just fine.

The only difference is that my local machine has postgres 9.1 and the remote machine postgres 9.4. (though they go to the same server which is 9.1)

If someone has some ideas, please share them.
thanks.

[SOLVED]
Go figure, the driver name should have been "{PostgreSQL UNICODE}" instead of "PostgreSQL Unicode(x64)" despite the registry telling me something else. I went back to the basics and used connectionstrings.com and just tried.
[/SOLVED]

推荐答案

[已解决]
去图,驱动程序名称应该是{PostgreSQL UNICODE}而不是PostgreSQL Unicode(x64)尽管注册表告诉我其他内容。我回到基础并使用了connectiontrings.com并尝试了。

[/已解决]
[SOLVED]
Go figure, the driver name should have been "{PostgreSQL UNICODE}" instead of "PostgreSQL Unicode(x64)" despite the registry telling me something else. I went back to the basics and used connectionstrings.com and just tried.
[/SOLVED]


这篇关于PostgreSQL ODBC驱动程序抛出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆