G
Guest
I have a CSV file, like the one you can save in Excel.
I want to use C# .NET to read the file and place the data into a sql2k data
base. and then import another file that would update those same records.
Assume file1.csv file contains 5 fields separated by commas named a,b,c,d,e
and the sql data bse has 5 char fields named f1,f2,f3,f4,f5
I want field 'a' from the csv to be imported into field 'f1' of the sql db
and so on to 'e' goes to 'f5'.
Then I have file2.csv which has the same fields a thru e with data that may
or may not need updating to the db. Field 'a' of the csv file is unique for
that row. So I need to read file2.csv, check to see if the data in field 'a'
matches a row of data in field 'f1' of the db, if it finds a match, then
replace the db row with the new data from file2.csv. If no match then just
leave it alone.
Thanks You
Paul
I want to use C# .NET to read the file and place the data into a sql2k data
base. and then import another file that would update those same records.
Assume file1.csv file contains 5 fields separated by commas named a,b,c,d,e
and the sql data bse has 5 char fields named f1,f2,f3,f4,f5
I want field 'a' from the csv to be imported into field 'f1' of the sql db
and so on to 'e' goes to 'f5'.
Then I have file2.csv which has the same fields a thru e with data that may
or may not need updating to the db. Field 'a' of the csv file is unique for
that row. So I need to read file2.csv, check to see if the data in field 'a'
matches a row of data in field 'f1' of the db, if it finds a match, then
replace the db row with the new data from file2.csv. If no match then just
leave it alone.
Thanks You
Paul