Saving Binary Data to a Paradox Binary Field via Code

I need to write (and read) a record to a binary field in (I can change
the field type to what ever makes the best sense if needed).

For example I have

        type MyRecord = record
                        value1: integer;
                        value2:double;
                        value3:string;
                        value4:boolean;
            end;

procedure AddBinRec(theRec:MyRecord; dataType: string;
idNumber:integer; resourceTitle:string);
var TheKey: string;
    DataRec: TBytesField;
begin
   DataRec := TBytesField.Create(AnalysisForm);
   TheKey := dataType + IntToStr(idNumber);
   DataRec.SetData(@theRec);
   ResourceTable.AppendRecord([TheKey,'', resourceTitle, DataRec]);
   ResourceTable.Post;
   DataRec.Free;
end;

The program blows up at the DataRec.SetData line.

Any help would be greatly appreciated!

Brien King
bk...@primenet.com