Click here to Skip to main content
15,900,325 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

Hello, 

I'm running into some difficulties on a small application I'm writing. I have a scenario where I have a master database file (.csv) and 50+ store database files (.csv). I need to check that the entries inside of the master database file exist in the individual store database files. Originally I had written this with formulas for Excel but it was taking too much time per data set to be viable. I figured out the logic of checking line by line against the store file using a while loop, but I ran into the problem of non alpha numeric sorting. Without a line of code to set my stream reader at index of 0 at each run it wouldn't scan the whole document. This wasn't viable because each document is 25,000+ items causing the code to run through 2.8 million times on average per validation check. My code works if the data is in a sorted format, but I wanted the application to have the tools to sort the data itself. 

So. .. .  long story short, I need help writing the code for taking an item selected by an open file dialog, parsing through its contents and sorting it into least to greatest fashion. I need to make sure that the data when sorted maintains integrity (i.e. if the first line contains 1,2,3,4 I only need it sorted off of the first entry (1) but for it to keep all of its trailing data. 

 Any help is appreciated. 

Thanks, 

Cuken 

Posted

1 solution

I would say use OleDb connections to connect to the files and get data in the table. Then you can sort it based on a particular column.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900