My requirement is to read some 40,000 records in a excel file and insert into the database. I use microsoft excel driver to read the data from excel file and odbc to insert into the database. The excel driver fails to read the whole 40,000 records at one stretch. So I read records from excel file in sets of 2000 records.. It works well till say 10th or 11th set of 2000 records i.e, 22000 records actually.. But after that excel file is not getting closed properly and microsoft provider error is thrown. To open the excel file and read 2000 records at one time and insert into the database, it takes 7 mins.. Instead of that, the excel connection is not getting closed properly . I am explictly closing and setting the excel connection to nothing b4 submitting the page . What could be reason for this , or how to handle this effectively.