[英]Connecting to AdventureWorks database (SQL Server 2005 Express) through Visual Studio Professional 2008
I am following the learning ASP.NET 3.5 by O'REILLY to write some ASP.NET 3.5 code using Visual Studio 2008 SP1. 我正在跟随O'REILLY 学习 ASP.NET 3.5 ,以使用Visual Studio 2008 SP1编写一些ASP.NET 3.5代码。 I have gotten to the point to where I need to Configure a Data Source using the SqlDataSource control. 我已经指出需要使用SqlDataSource控件配置数据源的位置。 I chose Microsoft SQL Server (SqlClient) even though I have SQL Server Express 2005 - This seems like the only logical choice. 即使我有SQL Server Express 2005,我还是选择了Microsoft SQL Server(SqlClient) -这似乎是唯一的逻辑选择。
I get to the Add Connection window and successfully add a Server name and I use the Select or enter a database name of AdventureWorks . 我进入“ 添加连接”窗口并成功添加服务器名称,然后使用“ 选择”或输入 AdventureWorks 的数据库名称 。 When I click on Test Connection I get the Test Connection Succeeded message box. 当我单击“测试连接”时,出现“ 测试连接成功”消息框。
Unfortunately, when I click OK I get an error message of the following: 不幸的是,当我单击“确定”时,收到以下错误消息:
Could not load file or assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0.0, Culture=neutral,
PublicKey Token=89845dcd8080cc91' or one of its dependecies. The system cannot find
the file specified.
At his point I am at a loss and everywhere I look and find something similar to my issue it involves other versions of either Visual Studio or SQL Server. 在他看来,我无所适从,到处寻找和发现与我的问题类似的东西,涉及到Visual Studio或SQL Server的其他版本。
I'd really appreciate any help on this! 我真的很感谢任何帮助!
您可以调查此食谱。
I had the exact same issue. 我有完全相同的问题。
Following the suggestions in this thread , I went to the " Microsoft SQL Server 2008 Feature Pack, August 2008 " - and downloaded (and installed) the "Microsoft SQL Server 2005 Backward Compatibility Components ". 按照此线程中的建议 ,我转到“ Microsoft SQL Server 2008功能包,2008年8月 ”,并下载(并安装了)“ Microsoft SQL Server 2005向后兼容性组件”。 This did not help. 这没有帮助。
Then I also downloaded and installed the following components: SharedManagementObjects.msi, sqlncli.msi, SQLSysClrTypes.msi. 然后,我还下载并安装了以下组件:SharedManagementObjects.msi,sqlncli.msi,SQLSysClrTypes.msi。
And now it works for me. 现在它对我有用。
I'm using SQL Server 2008 Express and Visual Web Developer 2008 Express Edition. 我正在使用SQL Server 2008 Express和Visual Web Developer 2008 Express Edition。
You may need to reinstall your copy of SQL 2005 Express. 您可能需要重新安装SQL 2005 Express副本。 But sure to install all of the client-side developer packages in the installer. 但是请确保在安装程序中安装所有客户端开发人员软件包。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.