Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to solve time out connection to SQL server from access VBA

Posted on 2014-01-17
4
Medium Priority
?
1,314 Views
Last Modified: 2014-01-30
I am getting this error while trying to connect and link in tables from Access vba to SQL Server.
Connection Failed:
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB][ConnectionOpen(Connect()).
Connection Failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not
exist or access is denied.
I found solution on the link below, but i am not sure how to implement it.

stackoverflow.com/questions/15120143/handling-a-sql-server-login-error-msg-with-vba/15277960#15277960


Any help would be apreciated.
0
Comment
Question by:maximyshka
4 Comments
 
LVL 27

Accepted Solution

by:
Zberteoc earned 1000 total points
ID: 39789459
That is not a timeout error but a permission one as it clearly states:

"[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not
exist or access is denied."

You either miss-typed something or you need to open remote access to that SQL server and/or the ports.
0
 
LVL 12

Assisted Solution

by:Dr. Thomas Henkelmann
Dr. Thomas Henkelmann earned 1000 total points
ID: 39792052
Agree with Zberteoc, this is not a time out but you either
- have used the wrong name for the SQL Server in your connection string (check FQDN and if you can ping this name)
- or have used a wrong username and password in your connection. or your Windows account is not able to connect if you use SSPI for security
- or the SQL server doesn't allow external connections for TCP or Named Pipes (check with your DBA)
0
 
LVL 24

Expert Comment

by:Bitsqueezer
ID: 39799201
Hi,

another possible error is if you do not use the FQDN (full qualified domain name) of the server. If you are working in a different domain and you only use the short name of the server itself then it can happen that the server name cannot be resolved (depending on the quality of your local DNS).
So instead of "YourServer" use something like "YourServer.domain.domain.com". If you have a named instance, add that at the end like: "YourServer.domain.domain.com\MyInstance"

Cheers,

Christian
0
 

Author Comment

by:maximyshka
ID: 39821569
I actualy misspelled rthe server name. We have very long server names so I wrote o insteadof 0 :-(
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question