SQL Server connection string keywords act as case sensitive although they shouldn't be

≯℡__Kan透↙ 提交于 2019-12-23 15:12:53

问题


I use .NET's OdbcConnectionStringBuilder to update a connection string read from a config file, which makes its keys lower case, as documented by MS ("Data Source" -> "data source").

The connection string is used to access MS SQL Server (2008, if it makes a difference).

It works fine on my machine (Windows 7 32 bit), and according to MS's documentation it should work:

Keywords are not case sensitive

However, on several other machines (at least some are 64 bit), the connection to DB could not be opened with this lower case. Only after changing the keywords manually to their original casing (upper case on the letter of each word) the DB connection was opened.

The keywords in the connection string (all were modified to lower case):

  • Data Source
  • Initial Catalog
  • Integrated Security

回答1:


Have you looked at collation settings?

http://msdn.microsoft.com/en-us/library/ms143508(v=sql.105).aspx



来源:https://stackoverflow.com/questions/17306520/sql-server-connection-string-keywords-act-as-case-sensitive-although-they-should

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!