neetugopal
December 11th, 2002, 10:39 AM
Dear All,
I have an ASP page which opens an ADO connection, read records from the Oracle database and generates a comma seperated file. Sequence of events is as below
1. Create ADO connection
2. Create and open a CSV file using FileSystem Object
3. Create and open Recordset
4. Loop through records and write to the CSV file
It may take long time to extract all records from the database in step 3 and 4. User may close the browser in frustration because it's taking long time and start again. To avoid consuming the CPU time I am checking IsClientConnected property of Response object after every step.
The problem I have here is if user closes the browser when the control is not returned from recordset.open (step 3) then file opened in step 2 will be locked by the web server and will only be released when session times out. If user starts the browser session again then web server will return permission denied as it has got hold of the CSV file.
Is there anyway to overcome this problem?
I have an ASP page which opens an ADO connection, read records from the Oracle database and generates a comma seperated file. Sequence of events is as below
1. Create ADO connection
2. Create and open a CSV file using FileSystem Object
3. Create and open Recordset
4. Loop through records and write to the CSV file
It may take long time to extract all records from the database in step 3 and 4. User may close the browser in frustration because it's taking long time and start again. To avoid consuming the CPU time I am checking IsClientConnected property of Response object after every step.
The problem I have here is if user closes the browser when the control is not returned from recordset.open (step 3) then file opened in step 2 will be locked by the web server and will only be released when session times out. If user starts the browser session again then web server will return permission denied as it has got hold of the CSV file.
Is there anyway to overcome this problem?