简体   繁体   中英

SQL connection String LocalDB - Console - keyword not supported “Server”

Working on a tool that queries an SQL Server Express LocalDB implementation, and I've tested the code to see that it works, but when I move the connection string from a hard coded string to one in an xml config file that I wrote, it gives the error below:

System.ArgumentException:不支持关键字:“服务器”

For reference, here is a shot of the code, I used prevously for the function call:

SQL查询功能测试代码。

and this is what I currently have in the XML Configuration File:

配置文件

If I change "Server" to "Data Provider" it also says that Data Provider is an unsupported keyword.

Looking through other questions, this is more than likely related to string formatting, or how I'm reading it in, but it does this regardless of single or double quotes.

将服务器更改回数据源,并从XML文件中删除引号。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM