Opening tOLEContainer

Giganews Newsgroups
Subject: Opening tOLEContainer
Posted by:  Del Murray (Del.Murr…@CreditHawk.Net)
Date: Mon, 30 Jul 2007

Anybody got a clue what is going on here .??.. D2007, MSSqlServer,
Debugger shows prog hangs on "createfromfile"

procedure TfReviewResume.FormActivate(Sender: TObject);
var
  oW: TOleContainer;
  wkAddRecent : OleVariant;
  wkFileName, x : string;

begin

  with qryWork do begin
      close;
      parameters.parambyname('id').value :=
        fMain.qryResumes.FieldByName('id').asinteger;
      open;
      (FieldByName('resume') as tBlobField).SaveToFile('d:\x.doc');  <<<<
yes, file is created.
  end;

  try
      ow.CreateObjectFromFile('d:\x.doc', False);              <<<<<< hangs
here
      ow.DoVerb(ovShow);
      x := 'yy';
  except

  end;

Replies