如何找到连接字符串的ODBC驱动程序名称? [英] How to find the ODBC driver name for a connection string?

查看:554
本文介绍了如何找到连接字符串的ODBC驱动程序名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我将ODBC驱动程序与完整的连接字符串一起使用而不仅仅是DSN条目时,我经常会收到类似于此的错误

Whenever I use ODBC drivers with a full connection string, and not just a DSN entry, I often get an error similar to this

Data source name not found and no default driver specified

我具有连接字符串的正确语法(或Internet这么说),但是我怀疑我不知道我正在使用的ODBC驱动程序的当前版本的正确名称

I have the correct syntax of the connection string (or so the Internet says), but I suspect I don't know the correct name for the current version of the ODBC driver I am using

如何找到32位或64位的正确名称?

How do I find the correct name, for either 32 or 64 bit?

推荐答案

使用ODBC数据源管理器应用程序.确保根据应用程序构建目标使用32位还是64位版本.然后选择文件DSN"标签

Use the ODBC Data Source Administrator app. Make sure you use the 32 bit or the 64 bit version depending on your applications build target. Then select the "File DSN" tab

点击添加"按钮,然后选择已安装的驱动程序

Click the "Add" button, and select the driver you have installed

然后单击高级"按钮

然后您可以复制并粘贴正确的驱动程序名称,然后从ODBC Data Source Administrator应用程序中取消

You can then copy and paste the correct driver name, and cancel out of the ODBC Data Source Administrator app

例如

DRIVER={PostgreSQL ODBC Driver(UNICODE)}

添加所需的其余参数,您将获得当前安装的驱动程序版本的有效ODBC连接字符串

Add the rest of the parameters required, and you will have a working ODBC connection string for the currently installed version of the driver

例如

Driver={PostgreSQL ODBC Driver(UNICODE)};Server=ruru.nz;Port=5432;Database=TheInternet;Uid=tfd;Pwd=p455w0rd;

享受:-)

这篇关于如何找到连接字符串的ODBC驱动程序名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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