I have problem with my VS 2012.
我的VS 2012有问题。
I have installed SQL Server 2008. The next step in what I did was to install SQL2000SampleDb.msi
(Northwind). On the command line, I installed everything, by this steps:
我已经安装了SQL Server 2008.我所做的下一步是安装SQL2000SampleDb.msi(Northwind)。在命令行上,我通过以下步骤安装了所有内容:
cd "C:\SQL Server 2000 Sample Databases"
sqlcmd -S .\sqlexpress -i instnwd.sql
Request:
请求:
Change database content to 'master'.
- 将数据库内容更改为“master”。
Change database content to 'Northwind'.
- 将数据库内容更改为“Northwind”。
3 step: sqlcmd -S .\sqlexpress
, and:
3步:sqlcmd -S。\ sqlexpress,和:
use northwind
select LastName from employees
go
and all was ok... but if I want to connect with VS I have problem. I'm creating a Windows Forms Application
一切都很好......但如果我想与VS联系我有问题。我正在创建一个Windows窗体应用程序
-> menu: Project -> Add New Data Source -> select Database -> Dataset.
- >菜单:项目 - >添加新数据源 - >选择数据库 - >数据集。
And now I can't see any connection to select, I have only the view:
现在我看不到任何连接选择,我只有视图:
http://pl.tinypic.com/r/1433rt3/8
http://pl.tinypic.com/r/1433rt3/8
and the second way which I did was such:
我做的第二种方式是这样的:
View -> server explorer -> PPM on Data connection -> "Add Connection"
-> Microsoft SQL Server (SqlClient)
and server name W-Komputer
, when I wanted to select a database this error appears:
和服务器名称W-Komputer,当我想选择数据库时出现此错误:
http://i60.tinypic.com/2exvuir.png
http://i60.tinypic.com/2exvuir.png
I tried this way, but not any effects: (please search in google: How to: Install Sample Databases - I haven't 10 reputation :( and I can't add more that 2 links)
我试过这种方式,但没有任何影响:(请在谷歌搜索:如何:安装示例数据库 - 我没有10声誉:(我不能添加更多的2个链接)
2 个解决方案
#1
1
You need to use W-Komputer\sqlexpress
as this is the name of the instance if Sql on your computer.
您需要使用W-Komputer \ sqlexpress,因为这是您计算机上的Sql的实例名称。
The .
when you are using sqlcmd is referring to your computer/localhost.
这个。当您使用sqlcmd时指的是您的计算机/ localhost。
#2
0
Try enable remote connection on Sql Server Configuration Manger.
尝试在Sql Server配置管理器上启用远程连接。
Follow this step : http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx
请按照以下步骤操作:http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx
#1
1
You need to use W-Komputer\sqlexpress
as this is the name of the instance if Sql on your computer.
您需要使用W-Komputer \ sqlexpress,因为这是您计算机上的Sql的实例名称。
The .
when you are using sqlcmd is referring to your computer/localhost.
这个。当您使用sqlcmd时指的是您的计算机/ localhost。
#2
0
Try enable remote connection on Sql Server Configuration Manger.
尝试在Sql Server配置管理器上启用远程连接。
Follow this step : http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx
请按照以下步骤操作:http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx