I've tried this many times and I have never been able to get it to work. I need to get lines to stop writing to a file when they already exist. Does anyone have any ideas? I have four fields in the data base, and I need my program to skip the line if the first field is equal to the one in the data base. Should I open the same data base twice and read it once to some how compare. I think I tried that before though.

I tried that and I couldn't get it to work. So now I would like to do someting else.

I want to open a file full of data diliminated by | into four fields. There are duplicates it the file. Then I want my program to look at field four and if there is more than one line with the same value it will not print the line to an out put file.