SQL Server 错误:连接字符串属性尚未初始化

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/37902257/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 04:39:50  来源:igfitidea点击:

SQL Server error: connection string property has not been initialized

sqlsql-server

提问by Ollie

I am trying to export a the results of a SQL query into Excel. I found this YouTube video that shows how to achieve this (https://www.youtube.com/watch?v=xCyZNY0isUM).

我正在尝试将 SQL 查询的结果导出到 Excel 中。我发现这个 YouTube 视频展示了如何实现这一点(https://www.youtube.com/watch?v=xCyZNY0isUM)。

Following these instructions, I right click on my database, go to Tasks > Export. The wizard launches. I pass the initial page, and I get to the "Choose a data Source". I leave the default (.Net Framework Data Provider for Odbc) and click "Next". Here, I get this error message:

按照这些说明,我右键单击我的数据库,转到“任务”>“导出”。向导启动。我通过了初始页面,然后进入“选择数据源”。我保留默认值(用于 Odbc 的 .Net Framework 数据提供程序)并单击“下一步”。在这里,我收到此错误消息:

connection string property has not been initialized (System.Data).

连接字符串属性尚未初始化 (System.Data)。

Thank you for your help.

感谢您的帮助。

回答by Ollie

Change the source from the default to "SQL Native Client" which relies on Windows Authentication.

将源从默认值更改为依赖 Windows 身份验证的“SQL Native Client”。

回答by Piyush Verma

Actually I had the same error but I changed the Choose Destination to native option (the last one) instead of doing "Choose Source" and apparently it worked.

实际上我有同样的错误,但我将选择目的地更改为本机选项(最后一个),而不是执行“选择源”,显然它有效。