Connecting to SQL

Solved/Closed
fahime - May 15, 2009 at 07:19 AM
 GODHRA - Dec 25, 2012 at 07:22 AM
Hello,
I have installed SQL Server 2005 and I can not connect to it , I dont know my server name and SQL Server show this error to me:
TITLE: Connect to Server
------------------------------

Cannot connect to home sql express.

------------------------------
ADDITIONAL INFORMATION:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 1231)

For help, click: https://www.microsoft.com/fr-fr/?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=1231

------------------------------
BUTTONS:

OK
------------------------------

5 responses

Here is the solution :
those who use combination of Windows XP and SQLExpress and have not installed sql-server engine on system should add the /sqlexpress to end of server name string
47
Do you mean that I should just add /SQLEXPRESS where it asks for the server name?
0
it worked for me :) :) :) thanksssssssss
0
Hi could not connect internet problem, solve just do mennual setting in your phone and than this error not come back
so enjoy using whatsapp.................
0
pls u go to property n see the server name then u find there the server name like

your pc name\SQLEXPRESS

u copy this name and paste it in the web config file of your asp.net framework as

<connectionStrings>
<add name="this name is as your wish" connectionString="server=your pc name\\SQLEXPRESS; catalog= your database name;SSPI=true; providerName="System.Data.SqlClient" "/>
</connectionString>
this section comes under <appSettings/>
then u call this string connection in ur aspx.cs code file as

// Create the Connection object.
string connectionString =
WebConfigurationManager.ConnectionStrings["this name is as your wish"].ConnectionString;
SqlConnection con = new SqlConnection(connectionString);
then u open the connection and use for your purpose and make sure that u close the connection after use
19
if we work in sql server , the server name will be the same as the
name if the host computer . that u can see in properties windows
like
10
I had the same prob. - All blogs had the same deadend solutions. I finally got it fixed with the following.

I am using SQL2008...

I added the sql server port to the connection string:

Server=YourSQLSRVR,10000;Database=YourDatabase;User ID=User;Password=?????????
6
How did you connect the server port to connection string? Where did you enter this address?
Kindly explain
0

Didn't find the answer you are looking for?

Ask a question
ABrightWorker
Oct 24, 2009 at 08:55 AM
Hi All,

There following possibilities.

1. Your SQl Browser is off
2. Protocols under SQLServer Configuration Manager > SQL Server 2005 Network Configuration > Protocols for SQL Express like TCP/IP, Named Pipes are disabled.

Resolution.

Just Start SQL Browser.
Enable the Protocols.
Restart SQL Express service.

This might resolve the problem

Thanks,
A Bright Worker
5
No boss, my protocols are enabled yet I face the issue
0