I am using below code for inserting data in the database. and i am inserting aprox 15000 records but after 245 records it throws the error \"Unable to open database\"
You are opening the database on each call it would take less resource to open it once then add all the rows before closing it. In theory what you are doing should work but it is not a way I would even start using.