Solved

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

Posted on 2014-01-17
4
1,288 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 26

Accepted Solution

by:
Zberteoc earned 250 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:thausla
thausla earned 250 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

820 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