No, you have not resolved the problem. Very shortly you are going to reply or open a new thread that you are using too much memory because as I recall you have 43 columns and enough rows to fill up 10 GB. All of that will have to be loaded into memory to use the LINQ
OrderBy()
.
As I told
@Anwind, doing a code migration has nothing to do with changing from using SQLite to switch to using the ACE, JET, or Sylvan CSV reader. Since at one time you see considering using ACE or JET, that means that your target platform is Windows. Since SQLite works on Windows, you are actually losing functionality by reading straight from the CSV instead importing the data into SQLite. Furthermore, she/you are now imposing a "usage" tax on your users. Instead of paying the one time cost of importing the data into SQLite, now your users have to pay the cost of always reading from the CSV all into memory and sorting every time.