使用 ODBC 连接到名称中包含句点的 MSSQL 数据库
如果我有一个名为“foo4.3”的数据库,并且我尝试使用 odbc 连接到它,它会查找名为“foo4”的数据库。该句点在任何其他字符串中都可以正常工作(例如,放“foo4.3”输出“foo4.3”,所以我有点困惑为什么它试图查找名为“foo4”的数据库。我已经尝试了文字字符串版本(单引号)以及启用转义的字符串(双引号)并尝试转义句点,但我得到了相同的结果。
If I have a database named something like "foo4.3" and I attempt to connect to it using odbc it looks for a database named "foo4". The period works fine in any other string (for instance puts "foo4.3" outputs "foo4.3" so I'm a little confused as to why it is attempting to look for a database named "foo4". I've already tried the literal string version (single quotes) as well as the escape enabled string (double quotes) and attempted to escape the period but I get the same results.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将数据库名称括在括号中:
[foo4.3]
Wrap the database name in brackets:
[foo4.3]