Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ODBC Drivers error '80040e31' - [Microsoft][ODBC SQL Server Driver]Timeout expired

1,569 views
Skip to first unread message

Chris

unread,
Apr 17, 2001, 10:32:04 AM4/17/01
to
I have set up a SQL Server connection to my database and everything pretty
much works fine. I have one page that runs a longer query that sometimes
goes beyond the default timeout period (60 seconds, I believe). I need to
set the connection timeout to be longer but cannot figure out how to do so.
I have read the tech note on editing the registry to add a "Connection
Timeout" string, but that did not help. I still get the error after about a
minute even though I set the value of that string to 300 (5 minutes).

Here is the full error message:

Microsoft OLE DB Provider for ODBC Drivers error '80040e31'

[Microsoft][ODBC SQL Server Driver]Timeout expired

/gwmanagement/pendReport.asp, line 25

Any ideas greatly appreciated.

Thanks

Chris


Carl Wright

unread,
Apr 17, 2001, 10:40:16 AM4/17/01
to
Try this

From the Tools menu, choose Options.
In the left pane, click Data Tools, and then click Data View.
Type a new value in the SQL query time-out box.

Carl

"Chris" <cdr...@gilsbar.com> wrote in message
news:9bhju2$78f$1...@misc.macromedia.com...

Chris

unread,
Apr 17, 2001, 10:54:14 AM4/17/01
to
Carl

Thanks for the tip. Where is the "Tools" menu? Is it in DreamWeaver
UltraDev somewhere that I am missing? I also looked in SQL Enterprise
Manager and could not find a screen matching your description. The solution
sounds promising, I just can't find the menu you refer to.

Thanks

Chris

"Carl Wright" <carl....@ntlworld.com> wrote in message
news:9bhkoc$9m5$1...@misc.macromedia.com...

Carl Wright

unread,
Apr 17, 2001, 10:59:40 AM4/17/01
to
Right at the top left of the screen in EM, under Console Window etc. should
say 'Action View Tools'


"Chris" <cdr...@gilsbar.com> wrote in message

news:9bhl7i$avo$1...@misc.macromedia.com...

Julian Roberts

unread,
Apr 17, 2001, 12:33:58 PM4/17/01
to
You could try resetting the connection timeout for the site through the IIS
manager (under website properties).

--

Jules
http://charon.co.uk
ICQ 51328805


"Chris" <cdr...@gilsbar.com> wrote in message

news:9bhju2$78f$1...@misc.macromedia.com...

Christopher Owens

unread,
Apr 17, 2001, 1:00:28 PM4/17/01
to
As Jules said, that's the place to set the default timeout for scripts.
Even though you set the timeout in your code to 300 seconds, the value set
in IIS overrides it to a point. You can set your script timeout in the code
for a period shorter than that in IIS, but not the other way around.

To set the value, open the MMC for IIS, right-click your site, and choose
Properties. Go to the Home Directory tab, then click Configuration down in
the Application Settings area. Click the App Options tab in the window that
appears, then set your ASP Script Timeout setting to something higher. I
had to do this in one of my applications since it takes a long time to
process a script returning 1200 records.

Best regards,
Chris


Chris

unread,
Apr 17, 2001, 3:05:13 PM4/17/01
to
Thanks, but the timeout is an ODBC timeout, not an IIS script timeout. I
have set the IIS timeout plenty high, but keep getting the connetion
timeout. This should be able to be set in MMDWUD. I am starting to dig my
way through the underlying code and it seems that the problem is the MMDWUD
does not use (or at least does not expose) the ADODB.Connection object so
you cannot set the connectionName.ConnectionTimeout = value. I have added
in an ADODB.Connection statement and it fixes everything, but it breaks UDs
auto code generation. So I can build the page in UD and then add my code at
the end, but never modify it again in UDs WYSIWIG environment.

Chris

"Christopher Owens" <cowens...@cnw.com> wrote in message
news:9bhso0$32q$1...@misc.macromedia.com...

Christopher Owens

unread,
Apr 17, 2001, 3:26:10 PM4/17/01
to
Interesting issue. Does your database take an extraordinarily long amount
of time to execute a query or is this strictly connection oriented? I'm
just curious as to the possible cause so that I might avoid it in the
future. It's kind of interesting the UD creates the connection when it
opens a recordset. All the books that I've read do it separately of the
recordset creation. I guess it's nice to have a shortcut available, but as
you've experienced, it appears that it can be problematic in some
circumstances.

Best regards,
Chris


Chris

unread,
Apr 17, 2001, 3:40:02 PM4/17/01
to
Not extraordinarily long - usually runs about 1 minute (universe is about
30GB of data). It is really the connection timeout that caused the problem.
Actually, I fixed it with the "CommandTimeout" property and got back my
WYSIWYG functionality by putting the connection code in the UD connection
file using the same variable name as they had used for the connection
string, but I made a real ADODB connection out of it. Not very smooth, but
it works...

"Christopher Owens" <cowens...@cnw.com> wrote in message
news:9bi597$onm$1...@misc.macromedia.com...
0 new messages