Thread-safe method to check if this iteration of IEnumerable object (partially) distinct?

I'm wondering if there's a threadsafe way for an IEnumerable-based object to retain certain property values from the previous iteration? I don't really care if other threads have queried this information, as I'll have a maximum of 4 threads at once, so the overhead of 4 calls isn't prohibitive, but the cost of 100s of adjacent entries may be.

I'd like to do this to reduce "expensive" lookups from another data source if the value returned is going to be the same as the last time I did it if the inputs haven't changed.

Please pardon any pseudo-code or missing semi-colons below (I'm attempting to address this now).

using Microsoft.SqlServer.Server; // SqlDataRecord and SqlMetaData
using System;
using System.Collections; // IEnumerator and IEnumerable
using System.Collections.Generic; // general IEnumerable and IEnumerator
using System.Data; // DataTable and SqlDataType
using System.Data.SqlClient; // SqlConnection, SqlCommand, and SqlParameter
using System.IO; // StreamReader
using System.Linq;                  
public class StreamingDataRecord : IEnumerable<SqlDataRecord>
{
    private string[] _lookupFields;
    private string _filePath;
    private SqlMetaData[] _pd;
    private string[] _prevIterInput;
    private long _prevIterLookup;
    public StreamingDataRecord(string FilePath)
    {
        _filePath = FilePath;
        _lookupFields = new string[] { "firstFieldofCompoundUniqueKey", "secondField" };
        _prevIterInput = new string[] { "", "" };
        _prevIterLookup = -1;
    }

    public IEnumerator<SqlDataRecord> GetEnumerator() {
        StreamReader fileReader = null;
        int i;
        bool newlookup;
        try {
            using (fileReader = new StreamReader(this._filePath)) {
                string inputRow = "";
                int len = this._pd.Length;
                string[] inputColumns = new string[len];
                long lookupID = -1;
                while (!fileReader.EndOfStream) {
                    inputRow = fileReader.ReadLine();
                    inputColumns = inputRow.Split(new char[]{','},len);
                    newlookup = false;
                    for(i=0;i < _prevIterInput.Length;i++) {
                        if (inputColumns[i] != _prevIterInput[i]) {
                            newlookup = true;
                            break;
                    }   }
                    if (!newlookup) { 
                        lookupID = _prevIterLookup; 
                    }
                    else { 
                        string s = "SELECT TOP (1) ID from Table1 WHERE ";
                        for(i=0; i < _prevIterInput.Length; i++) {
                            s += _lookupFields[i] + "=" + _prevIterInput[i];
                            if (i < _prevIterInput.Length-1) s += " AND ";
                        }
                        SqlCommand sq = new SqlCommand(s);
                        lookupID = (long)sq.ExecuteScalar();
                    }
                    _prevIterLookup = lookupID;
                    // now do stuff with the lookup value
                    // <Insert more code here> ;)
                    SqlDataRecord retval = new SqlDataRecord(); //based on inputRow
                    yield return retval; //not quite the proper constructor usage...but basically yield the next SqlDataRecord for streaming
                }
            }
        }
        finally {
        }
    }

If this code already accomplishes my stated aims, just let me know that:P I'm not familar with the limitations of IEnumerable objects and the implications of the yield keyword on object permanence, etc.