ArcGISCompare.msAccProcs.LoadValueMappings C# (CSharp) Method

LoadValueMappings() public method

public LoadValueMappings ( AttributeMappingData theAMap ) : System.Boolean
theAMap AttributeMappingData
return System.Boolean
        public Boolean LoadValueMappings(AttributeMappingData theAMap)
        {
            OleDbCommand theCMD;
              OleDbDataReader theReader;
              ValueData theS, theD;
              String theSQL = "";
              int vCount;
              String srcV, destV;
              ValueMappingData theMap;

              try
              {
            theSQL = "SELECT [sourceValue], [destinationValue], [valueCount] FROM [ValueMappings] WHERE [serialNumber] = " + theAMap.serialNumber + " AND [srcFieldName] = '" + theAMap.srcAtt + "' AND [destFieldName] = '" + theAMap.destAtt + "'";
            theCMD = new OleDbCommand(theSQL, theConn);

            checkOpen();
            theReader = theCMD.ExecuteReader(System.Data.CommandBehavior.CloseConnection);

            while (theReader.Read())
            {
              srcV = theReader.GetString(0);
              destV = theReader.GetString(1);
              vCount = 0;

              theS = new ValueData(theAMap.srcFC, srcV, theAMap.srcEnum);

              theD = new ValueData(theAMap.destFC, destV, theAMap.destEnum);

              theMap = new ValueMappingData(theAMap, theS, theD);

              theAMap.AddValueConversion(theMap);
            }

            return true;
              }
              catch (Exception ex) { return false; }
        }