Solved

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

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now