9 Replies - 594 Views - Last Post: 12 February 2018 - 01:50 PM Rate Topic: -----

#1 IrishLad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 12-February 18

ODBC Connection Timeout

Posted 12 February 2018 - 12:28 PM

Trying to connect to ODBC, Microsoft driver installed

DIM CnACCESS = New adodb.Connection

CnACCESS.Open "driver={SQL Server Native Client 11.0};server=usmegwv002.phx-dc.dhl.com;uid=UserName;pwd=Password;database=monitor;MultiSubnetFailover=true"
.
.
.

This post has been edited by modi123_1: 12 February 2018 - 12:59 PM
Reason for edit:: Removing name and password. Be careful next time.

Is This A Good Question/Topic? 0
  • +

Replies To: ODBC Connection Timeout

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14485
  • View blog
  • Posts: 58,052
  • Joined: 12-June 08

Re: ODBC Connection Timeout

Posted 12 February 2018 - 12:40 PM

Is there a question?

Are there any exceptions? If so please copy/paste them here.
Was This Post Helpful? 0
  • +
  • -

#3 IrishLad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 12-February 18

Re: ODBC Connection Timeout

Posted 12 February 2018 - 12:49 PM

View Postmodi123_1, on 12 February 2018 - 12:40 PM, said:

Is there a question?

Are there any exceptions? If so please copy/paste them here.


Runtime error
[MICROSOFT][ODBC SQL Server Driver] Login timeout expired

That is what appears
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14485
  • View blog
  • Posts: 58,052
  • Joined: 12-June 08

Re: ODBC Connection Timeout

Posted 12 February 2018 - 01:00 PM

Is the server public facing or open enough you should be getting to it?
Was This Post Helpful? 0
  • +
  • -

#5 IrishLad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 12-February 18

Re: ODBC Connection Timeout

Posted 12 February 2018 - 01:09 PM

NO it is open; not public facing

I should be able to connect to it
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14485
  • View blog
  • Posts: 58,052
  • Joined: 12-June 08

Re: ODBC Connection Timeout

Posted 12 February 2018 - 01:13 PM

There's way too little information on this, code shown, etc.

So.. perhaps wrap the connection in a try/catch and see if the exception provides more information.
Was This Post Helpful? 0
  • +
  • -

#7 IrishLad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 12-February 18

Re: ODBC Connection Timeout

Posted 12 February 2018 - 01:26 PM

Will DO
Was This Post Helpful? 0
  • +
  • -

#8 IrishLad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 12-February 18

Re: ODBC Connection Timeout

Posted 12 February 2018 - 01:37 PM

Do you have a suggestion of the type of Catch?
Like how it should be done or what you would expect as an example?
Was This Post Helpful? 0
  • +
  • -

#9 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14485
  • View blog
  • Posts: 58,052
  • Joined: 12-June 08

Re: ODBC Connection Timeout

Posted 12 February 2018 - 01:45 PM

I would imagine Exception as the type. Keep it general.

https://docs.microso...nally-statement

https://msdn.microso...y/ms973849.aspx
Was This Post Helpful? 0
  • +
  • -

#10 IrishLad   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 12-February 18

Re: ODBC Connection Timeout

Posted 12 February 2018 - 01:50 PM

Thanks
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1