473,378 Members | 1,564 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

ODBC Connection Timeout

After creating a routine to select from past ADODB connection strings, I

found that it takes 60 seconds to timeout! I found the Microsoft article

below

<http://support.microsoft.com/default.aspx?scid=kb;en-us;225859>

but wonder if anyone has a work around.

Nev
Nov 12 '05 #1
6 18665
That is probably the default. You can use the ConnectionTimeout method of
the ADO connection object and set it to whatever you want.

--
James Lankford
"Nifty" <ask@me ifyouwantknow.com> wrote in message
news:3f********@isuwb1.itbcorpweb.det.nsw.edu.au.. .
After creating a routine to select from past ADODB connection strings, I

found that it takes 60 seconds to timeout! I found the Microsoft article

below

<http://support.microsoft.com/default.aspx?scid=kb;en-us;225859>

but wonder if anyone has a work around.

Nev

Nov 12 '05 #2
Thanks for your prompt reply.

I'm still a novice at this and wonder if I could ask for a sample line of
how to use the ConnectionTimeout method. My code is below.

Many thanks in anticipation

Nev

Public Function bolCheckODBCAttachment(ByVal pstrTable As String) As Boolean

' --------------------------------------------------------------------------
----

On Error GoTo Err_bolCheckODBCAttachment

bolCheckODBCAttachment = False

DoCmd.Hourglass True

'18/10/03 Code from:

'Microsoft Knowledge Base Article - 210319

'ACC2000: How to Trap ODBC Logon Error Messages
Dim dbs As DAO.Database

Dim qdf As DAO.QueryDef

Set dbs = CurrentDb()

Set qdf = dbs.CreateQueryDef("")

qdf.Connect = pstrTable
qdf.ReturnsRecords = False

qdf.sql = "SELECT * FROM tblOptions"

qdf.Execute

bolCheckODBCAttachment = True

Exit_bolCheckODBCAttachment:

DoCmd.Hourglass False

Exit Function

Err_bolCheckODBCAttachment:

bolCheckODBCAttachment = False

DoCmd.OpenForm "zsfrmAttach", , , , , A_DIALOG

GoTo Exit_bolCheckODBCAttachment

End Function

"James Lankford" <dr*********@hotmail.com> wrote in message
news:vp************@corp.supernews.com...
That is probably the default. You can use the ConnectionTimeout method of
the ADO connection object and set it to whatever you want.

--
James Lankford
"Nifty" <ask@me ifyouwantknow.com> wrote in message
news:3f********@isuwb1.itbcorpweb.det.nsw.edu.au.. .
After creating a routine to select from past ADODB connection strings, I

found that it takes 60 seconds to timeout! I found the Microsoft article

below

<http://support.microsoft.com/default.aspx?scid=kb;en-us;225859>

but wonder if anyone has a work around.

Nev


Nov 12 '05 #3
Your code below is not using an ADO connection, rather it's using DAO. I
didn't see anywhere that you were attempting an ADO connection??

--
James Lankford
"Nifty" <ask@me ifyouwantknow.com> wrote in message
news:3f********@isuwb1.itbcorpweb.det.nsw.edu.au.. .
Thanks for your prompt reply.

I'm still a novice at this and wonder if I could ask for a sample line of
how to use the ConnectionTimeout method. My code is below.

Many thanks in anticipation

Nev

Public Function bolCheckODBCAttachment(ByVal pstrTable As String) As Boolean
' -------------------------------------------------------------------------- ----

On Error GoTo Err_bolCheckODBCAttachment

bolCheckODBCAttachment = False

DoCmd.Hourglass True

'18/10/03 Code from:

'Microsoft Knowledge Base Article - 210319

'ACC2000: How to Trap ODBC Logon Error Messages
Dim dbs As DAO.Database

Dim qdf As DAO.QueryDef

Set dbs = CurrentDb()

Set qdf = dbs.CreateQueryDef("")

qdf.Connect = pstrTable
qdf.ReturnsRecords = False

qdf.sql = "SELECT * FROM tblOptions"

qdf.Execute

bolCheckODBCAttachment = True

Exit_bolCheckODBCAttachment:

DoCmd.Hourglass False

Exit Function

Err_bolCheckODBCAttachment:

bolCheckODBCAttachment = False

DoCmd.OpenForm "zsfrmAttach", , , , , A_DIALOG

GoTo Exit_bolCheckODBCAttachment

End Function

"James Lankford" <dr*********@hotmail.com> wrote in message
news:vp************@corp.supernews.com...
That is probably the default. You can use the ConnectionTimeout method of the ADO connection object and set it to whatever you want.

--
James Lankford
"Nifty" <ask@me ifyouwantknow.com> wrote in message
news:3f********@isuwb1.itbcorpweb.det.nsw.edu.au.. .
After creating a routine to select from past ADODB connection strings, I
found that it takes 60 seconds to timeout! I found the Microsoft article
below

<http://support.microsoft.com/default.aspx?scid=kb;en-us;225859>

but wonder if anyone has a work around.

Nev



Nov 12 '05 #4
James

Thankyou for putting me straight! Of course you are correct - the code I
pinched, initially creates an

ADO connection string, checks in ADO with a timeout of 3, then converts it
to a DAO string for the actual connection. I had stupidly returned the
whole routine to ADO thinking I was modernising it!!

I've now returned to the check in ADO with the timeout of 3, so that bit is
solved. Thankyou.

My front end is large and still has many DAO routines. If I try to link on
the ADO string, I receive the error:

3170: Could not find installable ISAM which, despite

http://support.microsoft.com/default...b;EN-US;155666

I don't really understand.

Should I persue the ADO connection??

Nev

"James Lankford" <dr*********@hotmail.com> wrote in message
news:vp************@corp.supernews.com...
Your code below is not using an ADO connection, rather it's using DAO. I
didn't see anywhere that you were attempting an ADO connection??

--
James Lankford
"Nifty" <ask@me ifyouwantknow.com> wrote in message
news:3f********@isuwb1.itbcorpweb.det.nsw.edu.au.. .
Thanks for your prompt reply.

I'm still a novice at this and wonder if I could ask for a sample line of
how to use the ConnectionTimeout method. My code is below.

Many thanks in anticipation

Nev

Public Function bolCheckODBCAttachment(ByVal pstrTable As String) As Boolean

' --------------------------------------------------------------------------
----

On Error GoTo Err_bolCheckODBCAttachment

bolCheckODBCAttachment = False

DoCmd.Hourglass True

'18/10/03 Code from:

'Microsoft Knowledge Base Article - 210319

'ACC2000: How to Trap ODBC Logon Error Messages
Dim dbs As DAO.Database

Dim qdf As DAO.QueryDef

Set dbs = CurrentDb()

Set qdf = dbs.CreateQueryDef("")

qdf.Connect = pstrTable
qdf.ReturnsRecords = False

qdf.sql = "SELECT * FROM tblOptions"

qdf.Execute

bolCheckODBCAttachment = True

Exit_bolCheckODBCAttachment:

DoCmd.Hourglass False

Exit Function

Err_bolCheckODBCAttachment:

bolCheckODBCAttachment = False

DoCmd.OpenForm "zsfrmAttach", , , , , A_DIALOG

GoTo Exit_bolCheckODBCAttachment

End Function

"James Lankford" <dr*********@hotmail.com> wrote in message
news:vp************@corp.supernews.com...
That is probably the default. You can use the ConnectionTimeout method

of the ADO connection object and set it to whatever you want.

--
James Lankford
"Nifty" <ask@me ifyouwantknow.com> wrote in message
news:3f********@isuwb1.itbcorpweb.det.nsw.edu.au.. .
> After creating a routine to select from past ADODB connection
strings, I >
> found that it takes 60 seconds to timeout! I found the Microsoft article >
> below
>
> <http://support.microsoft.com/default.aspx?scid=kb;en-us;225859>
>
> but wonder if anyone has a work around.
>
> Nev
>
>



Nov 12 '05 #5
You're opening an ADO connection then trying to convert it to DAO? Why would
you want to do that? I'm not sure if that can be done. I would recommended
one or the other, at least for a single procedure. I often use both ADO and
DAO in my applications, but I usually don't intermingle them within a single
procedure.

--
James Lankford
"Nifty" <ask@me ifyouwantknow.com> wrote in message
news:3f********@isuwb1.itbcorpweb.det.nsw.edu.au.. .
James

Thankyou for putting me straight! Of course you are correct - the code I
pinched, initially creates an

ADO connection string, checks in ADO with a timeout of 3, then converts it
to a DAO string for the actual connection. I had stupidly returned the
whole routine to ADO thinking I was modernising it!!

I've now returned to the check in ADO with the timeout of 3, so that bit is solved. Thankyou.

My front end is large and still has many DAO routines. If I try to link on the ADO string, I receive the error:

3170: Could not find installable ISAM which, despite

http://support.microsoft.com/default...b;EN-US;155666

I don't really understand.

Should I persue the ADO connection??

Nev

"James Lankford" <dr*********@hotmail.com> wrote in message
news:vp************@corp.supernews.com...
Your code below is not using an ADO connection, rather it's using DAO. I
didn't see anywhere that you were attempting an ADO connection??

--
James Lankford
"Nifty" <ask@me ifyouwantknow.com> wrote in message
news:3f********@isuwb1.itbcorpweb.det.nsw.edu.au.. .
Thanks for your prompt reply.

I'm still a novice at this and wonder if I could ask for a sample line of how to use the ConnectionTimeout method. My code is below.

Many thanks in anticipation

Nev

Public Function bolCheckODBCAttachment(ByVal pstrTable As String) As

Boolean

' --------------------------------------------------------------------------
----

On Error GoTo Err_bolCheckODBCAttachment

bolCheckODBCAttachment = False

DoCmd.Hourglass True

'18/10/03 Code from:

'Microsoft Knowledge Base Article - 210319

'ACC2000: How to Trap ODBC Logon Error Messages
Dim dbs As DAO.Database

Dim qdf As DAO.QueryDef

Set dbs = CurrentDb()

Set qdf = dbs.CreateQueryDef("")

qdf.Connect = pstrTable
qdf.ReturnsRecords = False

qdf.sql = "SELECT * FROM tblOptions"

qdf.Execute

bolCheckODBCAttachment = True

Exit_bolCheckODBCAttachment:

DoCmd.Hourglass False

Exit Function

Err_bolCheckODBCAttachment:

bolCheckODBCAttachment = False

DoCmd.OpenForm "zsfrmAttach", , , , , A_DIALOG

GoTo Exit_bolCheckODBCAttachment

End Function

"James Lankford" <dr*********@hotmail.com> wrote in message
news:vp************@corp.supernews.com...
> That is probably the default. You can use the ConnectionTimeout
method of
> the ADO connection object and set it to whatever you want.
>
> --
> James Lankford
>
>
> "Nifty" <ask@me ifyouwantknow.com> wrote in message
> news:3f********@isuwb1.itbcorpweb.det.nsw.edu.au.. .
> > After creating a routine to select from past ADODB connection

strings,
I
> >
> > found that it takes 60 seconds to timeout! I found the Microsoft

article
> >
> > below
> >
> > <http://support.microsoft.com/default.aspx?scid=kb;en-us;225859>
> >
> > but wonder if anyone has a work around.
> >
> > Nev
> >
> >
>
>



Nov 12 '05 #6
Thanks again James

Sorry to be persitant but I have a situation where the server is often
unavailable.

The ADO connection is only used prior to the actual table connection routine
routine, to check whether Server and DB exist. This is used because a DAO
connection check has no timeout unavoidable system messages when the server
is not available. Am I correct in thinking there is no way to avoid this
intermingling?

I would prefer to use ADO throughout, but I'm not sure if that is wise when
there are quite few DAO routines still in the client file. What do you
think??

Nev

"James Lankford" <dragonzfang@_nospam_.hotmail.com> wrote in message
news:vq************@corp.supernews.com...
You're opening an ADO connection then trying to convert it to DAO? Why would you want to do that? I'm not sure if that can be done. I would recommended
one or the other, at least for a single procedure. I often use both ADO and DAO in my applications, but I usually don't intermingle them within a single procedure.

--
James Lankford
"Nifty" <ask@me ifyouwantknow.com> wrote in message
news:3f********@isuwb1.itbcorpweb.det.nsw.edu.au.. .
James

Thankyou for putting me straight! Of course you are correct - the code I
pinched, initially creates an

ADO connection string, checks in ADO with a timeout of 3, then converts it to a DAO string for the actual connection. I had stupidly returned the
whole routine to ADO thinking I was modernising it!!

I've now returned to the check in ADO with the timeout of 3, so that bit

is
solved. Thankyou.

My front end is large and still has many DAO routines. If I try to link

on
the ADO string, I receive the error:

3170: Could not find installable ISAM which, despite

http://support.microsoft.com/default...b;EN-US;155666

I don't really understand.

Should I persue the ADO connection??

Nev

"James Lankford" <dr*********@hotmail.com> wrote in message
news:vp************@corp.supernews.com...
Your code below is not using an ADO connection, rather it's using DAO. I didn't see anywhere that you were attempting an ADO connection??

--
James Lankford
"Nifty" <ask@me ifyouwantknow.com> wrote in message
news:3f********@isuwb1.itbcorpweb.det.nsw.edu.au.. .
> Thanks for your prompt reply.
>
> I'm still a novice at this and wonder if I could ask for a sample line
of
> how to use the ConnectionTimeout method. My code is below.
>
> Many thanks in anticipation
>
> Nev
>
>
>
>
>
> Public Function bolCheckODBCAttachment(ByVal pstrTable As String) As
Boolean
>
>

' -------------------------------------------------------------------------- > ----
>
> On Error GoTo Err_bolCheckODBCAttachment
>
> bolCheckODBCAttachment = False
>
> DoCmd.Hourglass True
>
> '18/10/03 Code from:
>
> 'Microsoft Knowledge Base Article - 210319
>
> 'ACC2000: How to Trap ODBC Logon Error Messages
>
>
> Dim dbs As DAO.Database
>
> Dim qdf As DAO.QueryDef
>
> Set dbs = CurrentDb()
>
> Set qdf = dbs.CreateQueryDef("")
>
> qdf.Connect = pstrTable
>
>
> qdf.ReturnsRecords = False
>
> qdf.sql = "SELECT * FROM tblOptions"
>
> qdf.Execute
>
> bolCheckODBCAttachment = True
>
> Exit_bolCheckODBCAttachment:
>
> DoCmd.Hourglass False
>
> Exit Function
>
> Err_bolCheckODBCAttachment:
>
> bolCheckODBCAttachment = False
>
> DoCmd.OpenForm "zsfrmAttach", , , , , A_DIALOG
>
> GoTo Exit_bolCheckODBCAttachment
>
> End Function
>
>
>
>
>
> "James Lankford" <dr*********@hotmail.com> wrote in message
> news:vp************@corp.supernews.com...
> > That is probably the default. You can use the ConnectionTimeout

method of
> > the ADO connection object and set it to whatever you want.
> >
> > --
> > James Lankford
> >
> >
> > "Nifty" <ask@me ifyouwantknow.com> wrote in message
> > news:3f********@isuwb1.itbcorpweb.det.nsw.edu.au.. .
> > > After creating a routine to select from past ADODB connection

strings,
I
> > >
> > > found that it takes 60 seconds to timeout! I found the Microsoft
article
> > >
> > > below
> > >
> > > <http://support.microsoft.com/default.aspx?scid=kb;en-us;225859>
> > >
> > > but wonder if anyone has a work around.
> > >
> > > Nev
> > >
> > >
> >
> >
>
>



Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andrew J Durstewitz | last post by:
I've noticed a few times yesterday I recived this error on my web server: SQL Server does not exist or access denied. I know for sure the server is running and at the time was under a load...
2
by: efinney | last post by:
Hi, Has anyone ever had trouble using the query analyzer tool through a vpn client? I'm able to connect outside of work to a sqlserver db on my company lan with enterprise mgr, but the query...
6
by: Anil Kumar Saharan | last post by:
Hi, I have a loopback connection using ODBC in the DLL initialization code of the SQL Server ESP Module (SQL Server 2000). The loopback connection works fine when the DSN is specifed with the...
1
by: Pradeep | last post by:
DB2ers, Our Windows application connects to any DB2 server using the ODBC driver. It seems there are two ODBC drivers that IBM provides - DB Connect and DB2 Runtime Client. We have tested our...
4
by: David Siroky | last post by:
Hi! I'm trying to connect to a MDB file via ODBC like this: char *DSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\dev-cpp\\test\\1.mdb"; SQLAllocEnv(&env); SQLAllocConnect(env,...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
4
by: Szymon Dembek | last post by:
Hi Recently I did some DB2 and ODBC coding in Visual FoxPro. I bumped on a problem I cannot resolve. When I issue a delete statement that deletes no rows (no rows qualify for the WHERE...
2
by: teddysnips | last post by:
One of our clients has reported a problem. Everything was working fine on Monday, but since Tuesday all is going wrong. The sysadmin assures me that there have been no changes to the network, or...
1
by: nilaangel78 | last post by:
Hi, I am developing winforms project using vb.net. In this i am connecting SQL 2000 DB using odbc connection. When i run SQL select query i am getting timeout error. But the same select query...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.