Re: ADO Connection Timeout
- From: Robert McCarter <RobertMcCarter@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 3 Jan 2007 09:11:01 -0800
Thank you all for your comments. Daniel, with regards to SQL server express,
can you set up stored procedures on the hosting machine and use server side
cursors on your client? I realize that express is NOT sql server, but I was
wondering if that would increase my performance?
Once again, thank you all for your input. It really is valuable to me and
this is how I have learned to program.
--
Thank you,
Robert
"Bob Barrows [MVP]" wrote:
Robert McCarter wrote:.
When I am running my program, and I unplug theThis is strange. When I use the following vbscript code to try to open a
cable it still takes 30 seconds to get an error. I have tried
ConnectionTimeout on the connection and CommandTimeout on the Command
and had no luck.
connection to a nonexistent database file I get an error back almost
instantaneously, although I am presuming some sort of caching is going
on, because my initial attempts took about a second.
dim cn, t
t=now
set cn=createobject("adodb.connection")
cn.commandtimeout=2
on error resume next
cn.open "provider=microsoft.jet.oledb.4.0;" & _
"data source=\\nonexistentserver\someshare\nonexistent.mdb"
if err<> 0 then
msgbox err.description,,(now-t)
else
msgbox "success",(now-t)
end if
cn.close
I was testing the relevance of the connectiontimeout setting, which I
believe only applies to the time period following the location of the
database file/server. Once the file/server is found, that is when the
actual connection attempt is made. The actual connection attempt is
limited by the connectiontimeout property. The timeout for locating a
network resource is controlled by either the network software or the
OS - I'm not sure which.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
- Follow-Ups:
- Re: ADO Connection Timeout
- From: Daniel Crichton
- Re: ADO Connection Timeout
- References:
- Re: ADO Connection Timeout
- From: Bob Barrows [MVP]
- Re: ADO Connection Timeout
- Prev by Date: Re: ADO Connection Timeout
- Next by Date: Re: ADO Connection Timeout
- Previous by thread: Re: ADO Connection Timeout
- Next by thread: Re: ADO Connection Timeout
- Index(es):
Relevant Pages
|
|