Well, its not fun giving the game away, but heres a start:
Firstly, you could read the file in as lines individually:
Code:
string[] lines = File.ReadAllLines(filename);
ArrayList extractedData = new ArrayList();
foreach(string line in lines)
{
string extract = string.Empty;
int position = line.IndexOf("|");
if(position > -1)
extract = line.Substring(0,position);
extractedData.Add(extract);
}
string[] extracts = new string[extractedData.Length];
Array.Copy(extractedData,extracts,0,extractedData.Length);
//Do your database bits here.
Hope this helps.
Regards,
Dominic