gpt4 book ai didi

macos - ODBC 驱动程序管理器 : Data source name not found and no default driver specified

转载 作者:行者123 更新时间:2023-12-04 00:24:05 25 4
gpt4 key购买 nike

我正在 OSX 上设置 Go、FreeTDS 和 unixODBC。我按照 https://code.google.com/p/odbc/wiki/InstallingUnixODBCOnOSX 上的说明进行操作,当我尝试运行测试时,我得到:

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

端口安装了 unixODBC FreeTDS,那么需要什么来解决这个问题?

最佳答案

在我看来,最好的方法是使用 DSN-less configuration — 当您在 ODBC 连接字符串中对连接到服务器实例所需的完整信息进行编码时。这种方法的好处是它需要客户端机器完全零配置,除了确保 FreeTDS ODBC 驱动程序正确安装。

注意在这种设置中适用于 FreeTDS 的两个注意事项:

  • 您必须使用端口 连接字符串键。如果您连接到 Microsoft® SQL Server™,它通常是 1433
  • FreeTDS 的默认值低得离谱 TDS protocol版本——类似于 5.0 .

    要覆盖它,您必须使用 TDS_Version 连接字符串键。将其设置为 auto 或某个合理的值:

    • Microsoft® SQL Server™ 7.0 → 7.0
    •  2000年→7.1
    •  2005→7.2
    • 〃 2008→7.3
    • 〃 2012→7.4

    看起来 7.2 是 FreeTDS 当前支持的最大 TDS 协议(protocol)版本,但实际上 7.2 足以处理典型的数据类型,包括 varbinary(max)

关于macos - ODBC 驱动程序管理器 : Data source name not found and no default driver specified,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19898932/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com