2

SQL Server 2008 and Visual Studio 2012

 2 years ago
source link: https://www.codesd.com/item/sql-server-2008-and-visual-studio-2012.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

SQL Server 2008 and Visual Studio 2012

advertisements

I have problem with my 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:

cd "C:\SQL Server 2000 Sample Databases"
sqlcmd -S .\sqlexpress -i instnwd.sql

Request:

  • Change database content to 'master'.
  • Change database content to 'Northwind'.

3 step: sqlcmd -S .\sqlexpress, and:

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

-> 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

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:

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)


You need to use W-Komputer\sqlexpress as this is the name of the instance if Sql on your computer.

The . when you are using sqlcmd is referring to your computer/localhost.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK