Wednesday, March 7, 2012

error 40

I have VS2005, SQL 2000, SQL Express and SQL 2005 installed on my laptop with
XP Pro. I have no problems connecting to SQL 2000 but get the following
error when I try to connect to SQL2005.
"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")."
My connection String is as follows:
connectionString="Data Source=sql2005;Initial Catalog=TestDB;Integrated
Security=True"
Thanks for any help in advance.
Hi
From the error message, it seems the connection stage was broken and I
would like to know if you have tried basic connectivity tests between the
two mahcines you are working on. One simple way to verifty connectivity is
to use command line tools, such as sqlcmd.exe. If it connects cross-machine
successfully, please also verify that your connection string in your
scenario is correct.
You may refer the articles below for more detailed information
Troubleshoot Connectivity Issue in SQL Server 2005 - Part III
http://blogs.msdn.com/sql_protocols/...22/506607.aspx
How to: Configure Express to accept remote connections
http://blogs.msdn.com/sqlexpress/arc...05/415084.aspx
How do I manage / connect to SQL Server Express?
http://www.aspfaq.com/sql2005/show.asp?id=3
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Michael,
I do not have 2 machines, VS2005, SQL2005, SQL2000 are running on the same
machine for developement purposes.
Thanks.
"Michael Cheng [MSFT]" wrote:

> Hi
> From the error message, it seems the connection stage was broken and I
> would like to know if you have tried basic connectivity tests between the
> two mahcines you are working on. One simple way to verifty connectivity is
> to use command line tools, such as sqlcmd.exe. If it connects cross-machine
> successfully, please also verify that your connection string in your
> scenario is correct.
> You may refer the articles below for more detailed information
> Troubleshoot Connectivity Issue in SQL Server 2005 - Part III
> http://blogs.msdn.com/sql_protocols/...22/506607.aspx
> How to: Configure Express to accept remote connections
> http://blogs.msdn.com/sqlexpress/arc...05/415084.aspx
> How do I manage / connect to SQL Server Express?
> http://www.aspfaq.com/sql2005/show.asp?id=3
> Thank you for your patience and cooperation. If you have any questions or
> concerns, don't hesitate to let me know. We are always here to be of
> assistance!
>
> Sincerely yours,
> Michael Cheng
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ================================================== ===
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
|||Hi Chico,
Thanks for the prompt update.
What's the instance name of your SQL Express?
In your connection string, I have noticed "Data Source=sql2005", does your
machine named "SQL2005" and you installed SQL Server 2005 Express as
default instance?
If you installed SQL Server 2005 Express as named instance, you will have
to connect the instance using connection string like "Data
Source=.\sql2005" (Here, I assume sql2005 is the name for default instance)
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.

No comments:

Post a Comment