程序如下,真的不知道该怎么去解决了,求各位帮忙吧,百思不得其解。
unit Unit1;interfaceuses
  SysUtils, Classes, DB, DBTables,Forms,MessageBox;type
  TDataContrls = class(TDataModule)
    HDataSource: TDataSource;
    RDataSource: TDataSource;
    CDataSource: TDataSource;
    HTable: TTable;
    RTable: TTable;
    CTable: TTable;
    procedure DataModuleCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;var
  DataContrls: TDataContrls;implementation{$R *.dfm}procedure TDataContrls.DataModuleCreate(Sender: TObject);
var
 success:Boolean;
begin
  success:=True;  if fileexists('House.dbf') then
  begin
  HTable.DatabaseName:=ExtractFilePath(Application.ExeName);
  HTable.TableName:='House.dbf';
  HTable.Close;
  HTable.Open;
 end
 else success:=False; if fileexists('Contract.dbf') then
 begin
  CTable.DatabaseName:=ExtractfilePath (Application.ExeName);
  CTable.TableName:='Contract.dbf';
  CTable.Close;
  CTable.Open;
  end
  else success:=False;  if fileexists('Rent.dbf')then
  begin
    RTable.DatabaseName :=ExtractfilePath(Application.ExeName);
    RTable.TableName:='Rent.dbf';
    RTable.Close;
    RTable.Open;
    end
     else success:=False;
     if not success then
     MessageBox('有数据库文件不存在,请进入系统后马上在系统维护中恢复数据.');
      end;end.

解决方案 »

  1.   

    uses
      SysUtils, Classes, DB, DBTables,Forms,MessageBox //把messageBox去掉   if not success then
          MessageBox('有数据库文件不存在,请进入系统后马上在系统维护中恢复数据.');
    //使用Application.MessageBox('有数据库文件不存在,请进入系统后马上在系统维护中恢复数据.'错误提示',MB_YESNO+MB_ICONINFORMATION);
      

  2.   

    [Fatal Error] Project1.dpr(12): Could not compile used unit 'Unit1.pas'
    [Error] Unit1.pas(63): Statement expected, but expression of type 'Integer' found
    [Error] Unit1.pas(63): Undeclared identifier: 'MB_ICONINFORMATION'
    [Error] Unit1.pas(63): Illegal character in input file: ',' ($A3AC)
    这为大哥,我按你的方法运行后出了这些毛病。55555555555
    再帮忙仔细看下吧。谢了!
      

  3.   

    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;从一个新的Form建立的pas 中抄袭下来的。
      

  4.   

    怎么还没有搞定? wywry(Wyatt) 说的就没有问题啊。 或者,你需要去找一个 messageBox 单元,这个就不是标准的单元了, 可能是你们的人自己做的单元。