2

In the past I used to install Ms SQL 2005 in my system separately but in recent years I never care to use them anymore as I totally depend on XML tables rather than those of Ms SQL. So I never had the need for installing them.

Today, I thought of trying out using Ms SQL 2005 again in my ASP.NET project as many people suggest that its far more better than XML tables.

When installing Ms Visual Studio 2008 Professional Edition, it seems some controls of Ms SQL 2005 is included. What I could see from the "All Programs" (from start menu) is the Microsoft SQL Server 2005 Folder. Inside, I have Configuration Folder only.

Now on my Visual Studio Project, My "Server Explorer" looks like the image below.

Solution Explorer of my PC

I cannot create a database by right-clicking the Data Connection. I always get an error same as the one I get when trying to add "New connection" by clicking on "Add Connection".

Let me show you how I did using images:

Step 1: Choosing the Data Source

Choose Data Source

Q 1: Are the data source shown here are installed on my system or just the names shown by Default even if its not installed?

Step 2: Connecting to Microsoft SQL Server

Error

The Error says: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provide: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"

Q 2: What does this mean?

My suspicion is that, this error occurred because I don't have SQL Server and my problem will be solved once I install SQL Server.

My curiosity is that, if SQL Server Database can be used even without installing SQL Server separately then why not just use it from here (Visual Studio) as some features seems to be already installed while installing Visual Studio.

Thank you for your time for caring to help me

4

3 回答 3

0

If you want to connect to SQL Server on your local machine, it needs to be installed on your local machine. The features installed as part of visual studio are front end management tools (depending on the version of Visual Studio installed).

Also, check out the version of SQL Server you're using for supportability purposes.

http://www.microsoft.com/en-us/sqlserver/support/support-updates.aspx

于 2013-09-25T14:55:07.153 回答
0

Those data sources shown in the image in Step 1 are not specific sources, they are simply types of sources. The Add Connection dialog you're looking at allows you to create a connection to, in the case that you selected Microsoft SQL Server, any MS SQL server you have access to connect to. Thus, your exact question: yes, what VS installs are simply drivers to connect to various databases, not the actual databases themselves.

Since you aren't running a MSSQL Server on your local machine, it tries to connect to your local machine to find a MSSQL server, can't, and thus gives that message. If you want to connect to a MSSQL server without installing one on your local machine, you could always find one someone else had installed on their machine and see if you could use it...

于 2013-09-25T14:57:10.217 回答
0

Q1: That list does not show existing datasources, it shows available ADO.Net providers (you can think of them as database drivers).

Q2: Why did you enter "Me" as server name; is this the name of your computer? Try ".", "localhost" or "localhost\SQLEXPRESS" instead.

于 2013-09-25T15:03:39.440 回答