Simon Wigzell wrote:
> Occassionaly I get the following error, always when storing a record:
>
> Microsoft OLE DB Provider for ODBC Drivers error '80040e31'
>
> [Microsoft][ODBC SQL Server Driver]Timeout expired
Nothing to do with your problem, but why are you using ODBC?
http://www.aspfaq.com/show.asp?id=2126
>
> Googling around I see ways of setting the expiry time but why is the
> database not responding in the first place?
Hard to say without knowing what you are trying to execute.
> It seems to me this has
> only started to occur with MS Server 2003, I don't recall it
> happening in MS Server 2000. It does seem to occur if the page has
> been idle for a while but I couldn't swear to that. This is not a
> very busy server. We are not dealing with a lot of records.
>
> I have these settings in my asp pages header:
>
> Server.ScriptTimeout = 50000
> session.timeout = 1000
These are totally irrelevant. Look at your error message. See where it's
coming from? Is it saying anything at all about a script timeout or a
session expiring?
This is an ADO timeout. Specifically a CommandTimeout. The ADO Connection
object has a CommandTimeout property. If you are using a Command object, it
also has that property.
This should help explain things:
http://www.aspfaq.com/show.asp?id=2066
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"