Converting formatted memo fields

Hello all,

I'm having great difficulties in converting Paradox formatted memo
fields to memo fields via the DbiDoRestructure call.  Here is the code
where I set up the field descriptor:

    //Modify the Field descriptors
    iOffsetDiff := 0;
    for i := 1 to Cursor.iFields do
         bModified := False;

         //Adjust the field offset
         if iOffsetDiff <> 0 then
              pCurrentfield.iOffset := pCurrentField.iOffset +
              bModified := True;

         //Change Fmt -> Memo
         if (pCurrentField.iFldType = fldBLOB) and
            (pCurrentField.iSubType = fldstFMTMEMO) then
              pCurrentField.iSubType := fldstMEMO;
              pCurrentField.iLen := pCurrentField.iLen + 1;
              bModified := True;

         //Set field nums
         if pCurrentField.ifldNum <> i then
              pCurrentField.ifldNum := i;
              bModified := True;

         //Set Op Type
         if bModified then
            pOpType^ := crMODIFY
             pOpType^ := crNOOP;

    //Reset these pointers!!
    Dec(pCurrentField, i - 1);
    Dec(pOpType, i - 1);

Can anyone provide any assistance? Thanks in advance!

Brett Hopkins
Catapult Systems Corp.