LoadFromFile problem

From: Bob Berry (callbob_at_paymentsinhand.com)
Date: 07/06/04

  • Next message: Viatcheslav V. Vassiliev: "Re: LoadFromFile problem"
    Date: Tue, 6 Jul 2004 12:18:11 -0600
    
    

    Following is a short segment of code that aborts on the table open line with
    'File temp_banners1 cannot be found.' However, if I comment out the
    LoadFromFile line, it runs fine (but is useless). Also, when I leave the
    LoadFromFile in, the table is not populated but I get no errors. Can
    someone tell me what I am missing?

      tempwide := data_files_path + tempbanners1_name;
      if FileExists(tempwide) then
        DeleteFile(tempwide);
      TADOTable(tblBanners).SaveToFile(tempwide, pfADTG);
      TADOQuery(qryDosomething).Connection := adocLibretto;
    // Create a new table named 'temp_banners1'.
      NewAccessTable(tempbanners1_name, adotblTemp_banners1,
    TADOQuery(qryDosomething), adocLibretto, False);
    // Populate the table.
      adotblTemp_banners1.LoadFromFile(tempwide);
      adotblTemp_banners1.Close; //
    reset the name because
      adotblTemp_banners1.TableName := tempbanners1_name; // LoadFromFile
      adotblTemp_banners1.Open;
    // changes it


  • Next message: Viatcheslav V. Vassiliev: "Re: LoadFromFile problem"