m3mdicl
asked on
TCP Provider Run Time Error
I have a VB6 app that has been running for 2 years and suddenly out of the blue i got this weird error. Do you guys have any idea about the runtime error?
The application is made from VB6 with SQL Server 2005 database.
Below is the connection string I am using.
Public Sub Open_Connection()
Set con = New ADODB.Connection
With con
.ConnectionString = "Provider=SQLNCLI;Server=xx.xxx.xxx.xx\instance;Database=myDbase;Uid=admin; Pwd=myPword1234;"
.CommandTimeout = 0
.CursorLocation = adUseClient
.Open
End With
End Sub
Any help is greatly appreciated.
-m3mdicl
You are using an IP address in your connection string.
Has the IP address of this server cahnged? Are you using DHCP? Can you PING the server using this IP from the client machine that is generating the error?
It is always best to use a named server and let your DNS/Hosts files resolve IP addresses.
Has the IP address of this server cahnged? Are you using DHCP? Can you PING the server using this IP from the client machine that is generating the error?
It is always best to use a named server and let your DNS/Hosts files resolve IP addresses.
ASKER
Hi everyone!!! Thanks for the quick reply.
As I've said the app is running for 2 years with no problem.
Some additional info.
* The IP address is STATIC.
* The username and password is correct (didn't make any changes)
* The firewall is not blocking the app
Any more suggestions?
As I've said the app is running for 2 years with no problem.
Some additional info.
* The IP address is STATIC.
* The username and password is correct (didn't make any changes)
* The firewall is not blocking the app
Any more suggestions?
ASKER
Hi,
The ip-address of the connection string has not changed. I can ping the server fine. The firewall is open for the traffic, the sql browser service is running. I can connect using the application from my home office. I am kind of stumped on why this is happening. Any ideas?
The ip-address of the connection string has not changed. I can ping the server fine. The firewall is open for the traffic, the sql browser service is running. I can connect using the application from my home office. I am kind of stumped on why this is happening. Any ideas?
Check the Event Viewer to see if there is any more info on why the SQL is rejecting to connection. (I have had a similar situation caused by a Windows Update.. ) Also check to see if anything has been done to the Server/SQL in terms of changes - new software, updates etc.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
None of the responses helped.
1. Is your login + password is correct and there exists a valid login in the server.
2. Is the firewall opened.
•Remote OLEDB connection using TCP to a server that is blocked by Firewall
HResult 0x274C, Level 16, State 1
TCP Provider: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Error: Microsoft SQL Native Client : 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..
Error: Microsoft SQL Native Client : Login timeout expired.
Ref:- http://blogs.msdn.com/b/sql_protocols/archive/2005/09/28/474698.aspx?PageIndex=11