Thanks for the replies guys, will play around with it. And to me there's no real difference (except syntax) between VB.NET and C#... all the C++ losers are converting to .NET (for years now) and that's most probably why it's "preferred" *shrug*. If you show me evidence for one being better than the other (convincing evidence) then sweet. But anyway, don't want this to turn into a debate over this. VB.NET for me is just easier and faster to develop in, so if I don't have any deadlines I actually sit and go through C# which I can (for the most part) write anything in... just sometimes get confused re: syntax.
@Semaphore: RE: "Well from my understand behind the principle of CSV files, its line imports not selective's so you could land up with data integrity loss"
CSV's are the most popular form of exported database data (I stand corrected) ever. They don't carry (or need to carry) data integrity as they're formatted in such a way to have record upon record of data, even if it repeats. We're not using them as storage, we have databases (relational) for that, but when we want to export data into raw files (for example excel) we don't want to have:
1,22,Penis
2,22,Vagina
3,22,Sex
3,23,Tricycle
We want the following:
Adult Entertainment,Penis
Adult Entertainment,Vagina
Adult Entertainment,Sex
Kids Entertainment,Tricycle
That makes more sense to someone wanting to manipulate the data for (example) reporting purposes.
Now considering that those are the most popular means of exporting data, and that this data doesn't contain integrity at all (it's all in one line, nothing relational about it and in 99.99% of the cases, the code that exports these files faults if it ****s up the "integrity" of the comma-delimited file, for example not using the correct text-identifiers and a comma ****ing up everything else... which any import program should check for, like mine) and that you cannot control (most of the time) the way and the order you receive these CSV's in, you have to somehow make your program work... right? or do you tell your client "Sorry, it's impossible?"
I'm going to re-iterate the same thing I've told all my juniors I've ever had under me... You can't force the user to change their data, you need to build your application to compensate for what they currently have, especially when they have other legacy systems in place producing this data for them. As an example of why I say this, I worked for a publications company a few years back who had 4 flat-file databases circa 1990, nothing relational in there and even though they contained the same data (magazine subscriptions/contacts), each of them differed slightly depending on the "custom" programming that took place on each of these dBase databases. So one would export Col1,Col2,Col3 and the other would export Col2,Col1,Col3,Col***WeetJy
So, what I'm attempting is for them to specify which columns need to go into which fields in the database, so the preview grid should look something like this:
Column0 | Column1 | Column2
[ ] | [ ] | [ ] <-- this contains no data, only an indication of whether or not this column is chosen to actually go into "Step 2"
Data | My balls | Are blue
....only 5 rows of data needs to display really, it's the columns I'm interested in, not the data...
So they can then check which columns they want to import, and Bob is your uncle, the next step would be to take their columns they selected, and giving them comboboxes to choose from which database fields they should go into and from there it goes into a nice little relational database. All data-integrity-and-snug-with-coco-and-a-blanky. Of course I could actually only make it 1 step, and have comboboxes in there to begin with so they can choose and import within a few clicks, but I've learned before (from working with the high-caliber data capturers you get these days :sarcasm

that it's more confusing to them the "easier" (I think) I made it to work with. So inserting an extra step sometimes is really best... even if it's not the quickest way to do things.
Now, I
could tell the client, "Impossible, you have to change the ways you get your data to be able to use my super-duper program" OR I could actually create my program to save them the effort of converting these CSV's into the correct "structure" I require from them to import it successfully... as I've been down that road before when my boss suggested they'll just quickly contact all of their suppliers (they did cold calling etc as well) and MAKE them change the file formats they got... I'm still LOL'ing.... but in any case.
I also ALWAYS and FOREVER try to get my clients to piss off. I'm not a people person, I don't want to code this **** forever and I don't want to "hardcode" several pieces just to make **** work with their current data, something which might change 2 days/2 months/2 years down the line. In my heart I know if I give them the ability to choose which columns fit in where, they can import the data they receive much easier and give me less of a pain in the ass dealing with "your program is ****!!" (when it's the data structure that changed for the umpteenth time, like Vodacom's exports they do on prepaid vouchers and recharges) and a lot more "Me" time spending surfing porn and doing **** I like...
Hope this makes you less confused?