I need to export more than millions of records from data grid or from sql query directly into different files formats such as .doc,.xls,.pdf,.txt. I was able to download into different file format when my result set was small around 1000 records, but when I query one of my tables which brings more than 1.5 millions of records it started to give me following errors
1 system out of memory.
2)connection timeout
How can I export such large result efficiently without any data loss.