PaulHInstincticve
Programmer
I am receiving the following error intermittently from my application
The connection cannot be used to perform this operation. It is either closed or invalid in this context
I cannot replicate this. I have an error handler running (to email me details of any errors that occur in a user friendly screen). This handler emails me details of this error occuring once every few days across 15 or so customers (eg with hundreds of members running the application). Unfortunately the application cannot pinpoint line numbers unless the error handler is turned off at which point it is unlikely I would hear of the error or be able to replicate it!
The only pattern that seems to have been showing up so far is that it has been happening more in one of the more resource intensive sections of the application that outputs a lot of information.
I am therefore suspecting that the error is due to a lack of resources on a shared web server which is why it is intermittent and happens in the busiest part of the application mainly (but not always). It also happens more for some of my bigger customers who will therefore have more members who will be using the application (this is an on-line event booking application for social clubs with 1000 to 3000 members each!).
I have scoured the internet for this message and only seem to come up with causes that can be replicated. I did however find one suggestion that says you always need to use SET before the activeconnection command, I have therefore just changed some code from
Set defaultsrs = Server.CreateObject( "ADODB.Recordset" )
defaultsrs.ActiveConnection = Con
to
Set defaultsrs = Server.CreateObject( "ADODB.Recordset" )
set defaultsrs.ActiveConnection = Con
I await to see if that makes any difference. Has anybody else had this? Thanks
Paul
The connection cannot be used to perform this operation. It is either closed or invalid in this context
I cannot replicate this. I have an error handler running (to email me details of any errors that occur in a user friendly screen). This handler emails me details of this error occuring once every few days across 15 or so customers (eg with hundreds of members running the application). Unfortunately the application cannot pinpoint line numbers unless the error handler is turned off at which point it is unlikely I would hear of the error or be able to replicate it!
The only pattern that seems to have been showing up so far is that it has been happening more in one of the more resource intensive sections of the application that outputs a lot of information.
I am therefore suspecting that the error is due to a lack of resources on a shared web server which is why it is intermittent and happens in the busiest part of the application mainly (but not always). It also happens more for some of my bigger customers who will therefore have more members who will be using the application (this is an on-line event booking application for social clubs with 1000 to 3000 members each!).
I have scoured the internet for this message and only seem to come up with causes that can be replicated. I did however find one suggestion that says you always need to use SET before the activeconnection command, I have therefore just changed some code from
Set defaultsrs = Server.CreateObject( "ADODB.Recordset" )
defaultsrs.ActiveConnection = Con
to
Set defaultsrs = Server.CreateObject( "ADODB.Recordset" )
set defaultsrs.ActiveConnection = Con
I await to see if that makes any difference. Has anybody else had this? Thanks
Paul