July 16, 2009 at 8:39 am
I realize that this is more of a programming question, but it involves SQL Server 2005, and connecting to it.
I’ve got a VB6 InteropForm application (.dll) that I’ve written, which integrates with one of our old VB6 applications, replacing one of the oldest VB6 forms in that app. I’ve tested the heck out of it, and when I put it onto the user’s machine, it worked fine. However, the conditions were just right, so that everything that would make it a “real” situation, didn’t exist when I placed it onto his PC 2 weeks ago. Today, the conditions are exactly right. And now it is failing for him. I’m using ADO.NET to access our SQL Server 2005 database. The error message he’s getting 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. (provider: Named Pipes Provider, error: 40 – Count not open a connection to SQL Server)”
OK, there are a few things I don’t understand here. First, it works perfectly fine on my PC. Granted, it is a development machine, but still, it works.
Second, I’ve searched on the web and the best explanation given for this error is that the connection string isn’t right somehow. So, if it isn’t right, why isn’t it always failing, evening for me? It works fine, for me, remember.
Third, I don’t get why ADO.NET is using named pipes? Here’s the connection string: “Data Source=OurServer;Initial Catalog=ClientData;User ID=intake;Password=thepassword;”
Fourth, I’ve verified that the tables being used in the relevant query are assessable to the intake user – that’s fine.
We’re using Windows XP Pro throughout our organization, with Windows 2003 Server for the servers.
Kindest Regards, Rod Connect with me on LinkedIn.
July 16, 2009 at 9:49 am
Have you checks Dave's blog out...
July 16, 2009 at 3:05 pm
sql_lock (7/16/2009)
I wasn't aware of this blog entry, thank you.
I've just checked it out, and there is some differences between what I see in our Windows 2003 Server, and Dave's blog post. For example, when I looked through the Computer Manager >> Service and Applications there was no SQL Server 2005 Configuration. So I went to the SQL Server Configuration Manager of of the Start menu. Assuming that is correct, I then tried to find the Network Configuration in SQL Server Configuration Manager, and I did find the TCP/IP protocol. In looking there, I see that the TCP/IP protocol is enabled on the server. In looking at the IP Addresses I see the server has 6 IP addresses, all of them are active, but none of the are enabled. Does that make a difference or not?
This is a Windows 2003 Server running on a 64-bit processor and OS, but we're using the 32-bot version of SQL Server on the box.
Kindest Regards, Rod Connect with me on LinkedIn.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply