简体   繁体   English

Visual Studio 2017 显示表数据不起作用

[英]Visual Studio 2017 Show Table Data does not work

I am using Visual Studio 2017's 'Server Explorer' to connect to a Microsoft SQL database.我正在使用 Visual Studio 2017 的“服务器资源管理器”连接到 Microsoft SQL 数据库。 I set up the connection and successfully connect to the database and can see the tables.我建立了连接并成功连接到数据库并且可以看到表。 However when I choose the 'Show Table Data' from one of the tables, I get the error 'An unexpected error occurred while populating the table or view information.'但是,当我从其中一个表中选择“显示表数据”时,出现错误“填充表或视图信息时发生意外错误”。

Interestingly, if I execute the query: 'SELECT * from table' for the same table, this seems to work correctly and shows the table data.有趣的是,如果我对同一个表执行查询:'SELECT * from table',这似乎可以正常工作并显示表数据。

Note also, that if I use Visual Studio 2010, I can connect to this same database and everything works as expected.另请注意,如果我使用 Visual Studio 2010,我可以连接到同一个数据库,一切都按预期工作。

Does anyone have an idea why this does not work in the 2017 version?有谁知道为什么这在 2017 版本中不起作用?

Thanks.谢谢。

I solved it by deleting the connection and adding it again.我通过删除连接并再次添加来解决它。 No need for restarting.无需重新启动。 I use Microsoft Visual Studio Community 2019.我使用 Microsoft Visual Studio Community 2019。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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