简体   繁体   English

通过Visual Studio Professional 2008连接到AdventureWorks数据库(SQL Server 2005 Express)

[英]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.

相关问题 Visual Studio 2008 Web Express:创建新的SQL Server数据库 - Visual Studio 2008 web express: create new SQL Server database 如何在SQL Server Express 2008中创建新数据库并允许连接? - How to create new database in SQL Server Express 2008 and allow for connecting? 如何使用Visual Studio 2008工具向特定用户授予对SQL Server Express数据库的访问权限? - How do I grant access to my SQL Server Express database to a specific user with Visual Studio 2008 tools? 将数据库添加到我的Visual Studio 2008项目中说我需要sql server express吗? - Adding a database to my Visual Studio 2008 project says I need sql server express? 连接到SQL Server数据库文件需要SQL Server 2005 Express或SQL Server 2008 asp net - Connection to SQL Server database files requires SQL Server 2005 Express or SQL Server 2008 asp net 在ASP.Net,Visual Studio 2008和Sql Server 2005上,有哪些很棒的秘密工作效率提示? - What are the secret productivity tips to be awesome at ASP.Net, Visual Studio 2008, and Sql Server 2005 连接到Visual Studio Express 2013 for Web中的数据库 - Connecting to database in Visual Studio Express 2013 for Web SQL Server 2005与Visual Studio 2010的连接 - SQL Server 2005 connection with visual studio 2010 连接到SQL Server Express数据库时遇到问题 - Trouble connecting to SQL Server Express database 如何在Visual Studio中添加SQL Server数据库文件(.mdf)而不安装SQL Server Express Edition? - How to add SQL Server database file (.mdf) in Visual Studio without installing SQL Server Express Edition?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM